<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 14:13:03 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Git - gitcore tutorial</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Miscellaneous">
                                Miscellaneous                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="2a4a5fd15eb6e79d6faf82390b3a5ab4fcf98eca0cc0358a3b9e5262e94c4311/d7" data-source="gitcore-tutorial" onmousemove="i18n(this)">gitcore-tutorial</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="498bf71a09b4d723a3a98f63f32b5ba7ef806c1deca2e62b838d2b215a95e841/ca" data-source="gitcore-tutorial - A Git core tutorial for developers" onmousemove="i18n(this)">gitcore-tutorial &mdash; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&ucy;&kcy;&ocy;&vcy;&ocy;&dcy;&scy;&tcy;&vcy;&ocy; &pcy;&ocy;  Git  &dcy;&lcy;&yacy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&chcy;&icy;&kcy;&ocy;&vcy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <p><span data-i18n="d93688dfec86394b03dd9e1d2b5c825ada2b2b315a5065c8cca548afda163a6b/5f" data-source="git *" onmousemove="i18n(this)">git *</span></p> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="357d76c5716d7d06c81aa023b6aa923ef8b8de7e34cc7cb9aedbb4e94a2393bd/52" data-source="This tutorial explains how to use the &amp;quot;core&amp;quot; Git commands to set up and work with a Git repository." onmousemove="i18n(this)">&Vcy; &ecy;&tcy;&ocy;&mcy; &rcy;&ucy;&kcy;&ocy;&vcy;&ocy;&dcy;&scy;&tcy;&vcy;&iecy; &ocy;&bcy;&hardcy;&yacy;&scy;&ncy;&yacy;&iecy;&tcy;&scy;&yacy;, &kcy;&acy;&kcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  &quot;core&quot;   Git  &dcy;&lcy;&yacy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  Git  &icy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &scy; &ncy;&icy;&mcy;.</span></p> <p><span data-i18n="bffb96ec58770fdb4c11ccad96d05a440ca83b1bacd2a547b3dd22ad669ee053/be" data-source="If you just need to use Git as a revision control system you may prefer to start with &amp;quot;A Tutorial Introduction to Git&amp;quot; (&lt;a href=&quot;gittutorial&quot;&gt;gittutorial[7]&lt;/a&gt;) or &lt;a href=&quot;user-manual&quot;&gt;the Git User Manual&lt;/a&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&acy;&mcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ncy;&ucy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  Git  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ycy; &kcy;&ocy;&ncy;&tcy;&rcy;&ocy;&lcy;&yacy; &vcy;&iecy;&rcy;&scy;&icy;&jcy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&chcy;&acy;&tcy;&softcy; &scy;  &quot;A Tutorial Introduction to Git&quot;  ( <a href="gittutorial.html">gittutorial[7]</a> ) &icy;&lcy;&icy;  <a href="user-manual.html">the Git User Manual</a> .</span></p> <p><span data-i18n="7df5ffc59368a41566599af9687698c417842837832651877ceef8e237b4a87a/cb" data-source="However, an understanding of these low-level tools can be helpful if you want to understand Git&amp;rsquo;s internals." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &pcy;&ocy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy; &ecy;&tcy;&icy;&khcy; &ncy;&icy;&zcy;&kcy;&ocy;&ucy;&rcy;&ocy;&vcy;&ncy;&iecy;&vcy;&ycy;&khcy; &icy;&ncy;&scy;&tcy;&rcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;&scy;&yacy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ycy;&mcy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &pcy;&ocy;&ncy;&yacy;&tcy;&softcy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&ocy;&scy;&tcy;&icy; Git.</span></p> <p><span data-i18n="dc6e922d84e5a2dab9eb8f525131023e04193c1415248be90cacf09952f8d5fa/56" data-source="The core Git is often called &amp;quot;plumbing&amp;quot;, with the prettier user interfaces on top of it called &amp;quot;porcelain&amp;quot;. You may not want to use the plumbing directly very often, but it can be good to know what the plumbing does when the porcelain isn&amp;rsquo;t flushing." onmousemove="i18n(this)">&YAcy;&dcy;&rcy;&ocy;  Git  &chcy;&acy;&scy;&tcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy;  &quot;plumbing&quot; , &acy; &bcy;&ocy;&lcy;&iecy;&iecy; &kcy;&rcy;&acy;&scy;&icy;&vcy;&ycy;&jcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&icy;&jcy; &icy;&ncy;&tcy;&iecy;&rcy;&fcy;&iecy;&jcy;&scy; &pcy;&ocy;&vcy;&iecy;&rcy;&khcy; &ncy;&iecy;&gcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;  &quot;porcelain&quot; . &Vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &vcy;&ycy; &ncy;&iecy; &zcy;&acy;&khcy;&ocy;&tcy;&icy;&tcy;&iecy; &chcy;&acy;&scy;&tcy;&ocy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy;&ocy;&dcy;&ocy;&pcy;&rcy;&ocy;&vcy;&ocy;&dcy;&ocy;&mcy;, &ncy;&ocy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy; &zcy;&ncy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy; &vcy;&ocy;&dcy;&ocy;&pcy;&rcy;&ocy;&vcy;&ocy;&dcy;, &kcy;&ocy;&gcy;&dcy;&acy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy; &ncy;&iecy; &scy;&mcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;.</span></p> <p><span data-i18n="59bd1005dd6976e2ba734c7362b4407cc994645c6676ebb674f989e8c1868d88/40" data-source="Back when this document was originally written, many porcelain commands were shell scripts. For simplicity, it still uses them as examples to illustrate how plumbing is fit together to form the porcelain commands. The source tree includes some of these scripts in contrib/examples/ for reference. Although these are not implemented as shell scripts anymore, the description of what the plumbing layer commands do is still valid." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &ecy;&tcy;&ocy;&tcy; &dcy;&ocy;&kcy;&ucy;&mcy;&iecy;&ncy;&tcy; &bcy;&ycy;&lcy; &pcy;&iecy;&rcy;&vcy;&ocy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy; &ncy;&acy;&pcy;&icy;&scy;&acy;&ncy;, &mcy;&ncy;&ocy;&gcy;&icy;&iecy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy;&ocy;&vcy;&ycy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&lcy;&icy; &scy;&ocy;&bcy;&ocy;&jcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&icy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy;. &Dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy;&tcy;&ycy; &ocy;&ncy;&icy; &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&ocy;&vcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&ocy;&icy;&lcy;&lcy;&yucy;&scy;&tcy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy; &scy;&acy;&ncy;&tcy;&iecy;&khcy;&ncy;&icy;&kcy;&acy; &scy;&ocy;&chcy;&iecy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &dcy;&rcy;&ucy;&gcy; &scy; &dcy;&rcy;&ucy;&gcy;&ocy;&mcy;, &ocy;&bcy;&rcy;&acy;&zcy;&ucy;&yacy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy;&ocy;&vcy;&ycy;&iecy; &kcy;&ocy;&mcy;&pcy;&ocy;&zcy;&icy;&tscy;&icy;&icy;. &Dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &kcy;&ocy;&dcy;&acy; &vcy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &icy;&zcy; &ecy;&tcy;&icy;&khcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&iecy;&vcy; &vcy; contrib/examples/ &dcy;&lcy;&yacy; &scy;&pcy;&rcy;&acy;&vcy;&kcy;&icy;. &KHcy;&ocy;&tcy;&yacy; &ocy;&ncy;&icy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy; &rcy;&iecy;&acy;&lcy;&icy;&zcy;&ocy;&vcy;&acy;&ncy;&ycy; &vcy; &vcy;&icy;&dcy;&iecy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&iecy;&vcy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy;, &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&iecy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&yucy;&tcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &scy;&acy;&ncy;&tcy;&iecy;&khcy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&gcy;&ocy; &ucy;&rcy;&ocy;&vcy;&ncy;&yacy;, &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &acy;&kcy;&tcy;&ucy;&acy;&lcy;&softcy;&ncy;&ocy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="bc68bc4cccf68c43c540f506374375d554a6ee798077a7e998d825031ab9ffeb/51" data-source="Deeper technical details are often marked as Notes, which you can skip on your first reading." onmousemove="i18n(this)">&Bcy;&ocy;&lcy;&iecy;&iecy; &gcy;&lcy;&ucy;&bcy;&ocy;&kcy;&icy;&iecy; &tcy;&iecy;&khcy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&iecy; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &chcy;&acy;&scy;&tcy;&ocy; &pcy;&ocy;&mcy;&iecy;&chcy;&acy;&yucy;&tcy;&scy;&yacy; &kcy;&acy;&kcy; &pcy;&rcy;&icy;&mcy;&iecy;&chcy;&acy;&ncy;&icy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy; &pcy;&rcy;&icy; &pcy;&iecy;&rcy;&vcy;&ocy;&mcy; &chcy;&tcy;&iecy;&ncy;&icy;&icy;.</span></td> </tr> </table></div> </div> </div> <h2 class="text-body-emphasis"  id="_creating_a_git_repository"><span data-i18n="d6b607e22e8a172993c28190eda1d568d51ec5659ae33bce14a1d38523baf292/05" data-source="Creating a git repository" onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  git</span></h2> <div> <p><span data-i18n="7bea07c93935c9ae63c0aac870dd10d451a78b0266dc56ed91fdce943ac3b12e/08" data-source="Creating a new Git repository couldn&amp;rsquo;t be easier: all Git repositories start out empty, and the only thing you need to do is find yourself a subdirectory that you want to use as a working tree - either an empty one for a totally new project, or an existing working tree that you want to import into Git." onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &ncy;&ocy;&vcy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  Git  &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&rcy;&ocy;&shchcy;&iecy;: &vcy;&scy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;  Git  &icy;&zcy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy; &pcy;&ucy;&scy;&tcy;&ycy;, &icy; &iecy;&dcy;&icy;&ncy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;&iecy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;, &ecy;&tcy;&ocy; &ncy;&acy;&jcy;&tcy;&icy; &scy;&iecy;&bcy;&iecy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &mdash; &lcy;&icy;&bcy;&ocy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &dcy;&lcy;&yacy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ocy; &ncy;&ocy;&vcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;. &icy;&lcy;&icy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &icy;&mcy;&pcy;&ocy;&rcy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;  Git .</span></p> <p><span data-i18n="d757d205a8ef3b092bbb3f3bd121f3d0e9dc01af301a02ab93bf61ad93eea5cc/a0" data-source="For our first example, we&amp;rsquo;re going to start a totally new repository from scratch, with no pre-existing files, and we&amp;rsquo;ll call it &lt;code&gt;git-tutorial&lt;/code&gt;. To start up, create a subdirectory for it, change into that subdirectory, and initialize the Git infrastructure with &lt;code&gt;git init&lt;/code&gt;:" onmousemove="i18n(this)">&Vcy; &ncy;&acy;&shcy;&iecy;&mcy; &pcy;&iecy;&rcy;&vcy;&ocy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy; &mcy;&ycy; &scy;&ocy;&bcy;&icy;&rcy;&acy;&iecy;&mcy;&scy;&yacy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ocy; &ncy;&ocy;&vcy;&ycy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &scy; &ncy;&ucy;&lcy;&yacy;, &bcy;&iecy;&zcy; &rcy;&acy;&ncy;&iecy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&vcy;&shcy;&icy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &icy; &ncy;&acy;&zcy;&ocy;&vcy;&iecy;&mcy; &iecy;&gcy;&ocy;  <code>git-tutorial</code> . &Dcy;&lcy;&yacy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy; &scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &dcy;&lcy;&yacy; &ncy;&iecy;&gcy;&ocy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;, &pcy;&iecy;&rcy;&iecy;&jcy;&dcy;&icy;&tcy;&iecy; &vcy; &ecy;&tcy;&ocy;&tcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &icy; &icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &icy;&ncy;&fcy;&rcy;&acy;&scy;&tcy;&rcy;&ucy;&kcy;&tcy;&ucy;&rcy;&ucy;  Git  &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git init</code> :</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">mkdir</span> git-tutorial</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">cd</span> git-tutorial</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git init</span></pre> </div> </div> <p><span data-i18n="b38fed9e4336b5bc1ac333b742b082ba9afb75f790cad5c85542515e1d101cd4/bb" data-source="to which Git will reply" onmousemove="i18n(this)">&ncy;&acy; &chcy;&tcy;&ocy;  Git  &ocy;&tcy;&vcy;&iecy;&tcy;&icy;&tcy;</span></p> <div> <div> <pre class="hljs language-php">Initialized <span class="hljs-keyword">empty</span> Git repository in .git/</pre> </div> </div> <p><span data-i18n="a6cbde2e35f266248aabbe7e3390fe57b9bda8c5ca8a0a5fcf6fa6a98920b368/e9" data-source="which is just Git&amp;rsquo;s way of saying that you haven&amp;rsquo;t been doing anything strange, and that it will have created a local &lt;code&gt;.git&lt;/code&gt; directory setup for your new project. You will now have a &lt;code&gt;.git&lt;/code&gt; directory, and you can inspect that with &lt;code&gt;ls&lt;/code&gt;. For your new empty project, it should show you three entries, among other things:" onmousemove="i18n(this)">&ecy;&tcy;&ocy; &vcy;&scy;&iecy;&gcy;&ocy; &lcy;&icy;&shcy;&softcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy; Git &scy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &ncy;&iecy; &dcy;&iecy;&lcy;&acy;&lcy;&icy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &scy;&tcy;&rcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &icy; &chcy;&tcy;&ocy; &ocy;&ncy; &scy;&ocy;&zcy;&dcy;&acy;&scy;&tcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ucy;&yucy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&ucy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  <code>.git</code>  &dcy;&lcy;&yacy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &ncy;&ocy;&vcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;. &Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &ucy; &vcy;&acy;&scy; &bcy;&ucy;&dcy;&iecy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>.git</code> , &icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;&softcy; &iecy;&gcy;&ocy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>ls</code> . &Dcy;&lcy;&yacy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &ncy;&ocy;&vcy;&ocy;&gcy;&ocy; &pcy;&ucy;&scy;&tcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &ocy;&ncy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &vcy;&acy;&mcy;, &scy;&rcy;&iecy;&dcy;&icy; &pcy;&rcy;&ocy;&chcy;&iecy;&gcy;&ocy;, &tcy;&rcy;&icy; &zcy;&acy;&pcy;&icy;&scy;&icy;:</span></p> <div> <ul> <li> <p><span data-i18n="78654dc7409f346e8501c0c67ca8a743cedc98a003aa930be75dcfb1939b96c0/8d" data-source="a file called &lt;code&gt;HEAD&lt;/code&gt;, that has &lt;code&gt;ref: refs/heads/master&lt;/code&gt; in it. This is similar to a symbolic link and points at &lt;code&gt;refs/heads/master&lt;/code&gt; relative to the &lt;code&gt;HEAD&lt;/code&gt; file." onmousemove="i18n(this)">&fcy;&acy;&jcy;&lcy; &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>HEAD</code> , &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &iecy;&scy;&tcy;&softcy;  <code>ref: refs/heads/master</code> . &Ecy;&tcy;&ocy; &pcy;&ocy;&khcy;&ocy;&zhcy;&iecy; &ncy;&acy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&kcy;&ucy;&yucy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &icy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy;  <code>refs/heads/master</code>  &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;  <code>HEAD</code> .</span></p> <p><span data-i18n="7b8535243cb267ac89594c638b41a8366cad3985a2b813f5d7b16ee1c080a30b/45" data-source="Don&amp;rsquo;t worry about the fact that the file that the &lt;code&gt;HEAD&lt;/code&gt; link points to doesn&amp;rsquo;t even exist yet &amp;mdash; you haven&amp;rsquo;t created the commit that will start your &lt;code&gt;HEAD&lt;/code&gt; development branch yet." onmousemove="i18n(this)">&Ncy;&iecy; &bcy;&iecy;&scy;&pcy;&ocy;&kcy;&ocy;&jcy;&tcy;&iecy;&scy;&softcy; &ocy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &fcy;&acy;&jcy;&lcy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &scy;&scy;&ycy;&lcy;&kcy;&acy;  <code>HEAD</code> , &iecy;&shchcy;&iecy; &dcy;&acy;&zhcy;&iecy; &ncy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &mdash; &vcy;&ycy; &iecy;&shchcy;&iecy; &ncy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy; &vcy;&acy;&shcy;&ucy; &vcy;&iecy;&tcy;&kcy;&ucy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&kcy;&icy;  <code>HEAD</code> .</span></p> </li> <li> <p><span data-i18n="25057ca62d5931fe26101e53e3dfd2a0cfe4e5c9f16a8ed12b5ecbd35376222a/2c" data-source="a subdirectory called &lt;code&gt;objects&lt;/code&gt;, which will contain all the objects of your project. You should never have any real reason to look at the objects directly, but you might want to know that these objects are what contains all the real &lt;code&gt;data&lt;/code&gt; in your repository." onmousemove="i18n(this)">&pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>objects</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &bcy;&ucy;&dcy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;. &Ucy; &vcy;&acy;&scy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ocy; &bcy;&ycy;&tcy;&softcy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&ycy; &scy;&mcy;&ocy;&tcy;&rcy;&iecy;&tcy;&softcy; &ncy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy;, &ncy;&ocy; &vcy;&acy;&mcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&ocy; &zcy;&ncy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &ecy;&tcy;&icy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy; &vcy;&iecy;&scy;&softcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&icy;&jcy;  <code>data</code>  &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> </li> <li> <p><span data-i18n="270b04d48bcbc47bf75c25380b2cfec4eebd1b0bbfbf5f2c5d40d8e814d32691/af" data-source="a subdirectory called &lt;code&gt;refs&lt;/code&gt;, which contains references to objects." onmousemove="i18n(this)">&pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>refs</code> , &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&jcy; &scy;&scy;&ycy;&lcy;&kcy;&icy; &ncy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;.</span></p> </li> </ul> </div> <p><span data-i18n="6dcbc70aecc9d1dbb08a6676600820c22ee867e4c7045521c30053cc3f9431c9/2c" data-source="In particular, the &lt;code&gt;refs&lt;/code&gt; subdirectory will contain two other subdirectories, named &lt;code&gt;heads&lt;/code&gt; and &lt;code&gt;tags&lt;/code&gt; respectively. They do exactly what their names imply: they contain references to any number of different &lt;code&gt;heads&lt;/code&gt; of development (aka &lt;code&gt;branches&lt;/code&gt;), and to any &lt;code&gt;tags&lt;/code&gt; that you have created to name specific versions in your repository." onmousemove="i18n(this)">&Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&scy;&tcy;&icy;, &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>refs</code>  &bcy;&ucy;&dcy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &dcy;&vcy;&acy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &scy; &icy;&mcy;&iecy;&ncy;&acy;&mcy;&icy;  <code>heads</code>  &icy;  <code>tags</code>  &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;. &Ocy;&ncy;&icy; &dcy;&iecy;&lcy;&acy;&yucy;&tcy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &tcy;&ocy;, &chcy;&tcy;&ocy; &pcy;&ocy;&dcy;&rcy;&acy;&zcy;&ucy;&mcy;&iecy;&vcy;&acy;&yucy;&tcy; &icy;&khcy; &ncy;&acy;&zcy;&vcy;&acy;&ncy;&icy;&yacy;: &ocy;&ncy;&icy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy; &scy;&scy;&ycy;&lcy;&kcy;&icy; &ncy;&acy; &lcy;&yucy;&bcy;&ocy;&iecy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&ocy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&khcy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy;  <code>heads</code>  (&tcy;&acy;&kcy;&zhcy;&iecy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ycy;&khcy; &kcy;&acy;&kcy;  <code>branches</code> ) &icy; &ncy;&acy; &lcy;&yucy;&bcy;&ocy;&jcy;  <code>tags</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy; &dcy;&lcy;&yacy; &ocy;&bcy;&ocy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&ycy;&khcy; &vcy;&iecy;&rcy;&scy;&icy;&jcy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> <p><span data-i18n="2af792088d32e1ede6d01aa04a4f2995bb4b02071b17d5583e7f8035b1f5be25/fa" data-source="One note: the special &lt;code&gt;master&lt;/code&gt; head is the default branch, which is why the &lt;code&gt;.git/HEAD&lt;/code&gt; file was created points to it even if it doesn&amp;rsquo;t yet exist. Basically, the &lt;code&gt;HEAD&lt;/code&gt; link is supposed to always point to the branch you are working on right now, and you always start out expecting to work on the &lt;code&gt;master&lt;/code&gt; branch." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&ocy; &zcy;&acy;&mcy;&iecy;&chcy;&acy;&ncy;&icy;&iecy;: &scy;&pcy;&iecy;&tscy;&icy;&acy;&lcy;&softcy;&ncy;&acy;&yacy; &gcy;&ocy;&lcy;&ocy;&vcy;&acy;  <code>master</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;  <code>.git/HEAD</code>  &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy; &ncy;&iecy;&iecy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy; &ocy;&ncy;&acy; &iecy;&shchcy;&iecy; &ncy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;. &Pcy;&ocy; &scy;&ucy;&tcy;&icy;, &scy;&scy;&ycy;&lcy;&kcy;&acy;  <code>HEAD</code>  &vcy;&scy;&iecy;&gcy;&dcy;&acy; &dcy;&ocy;&lcy;&zhcy;&ncy;&acy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &ncy;&acy; &vcy;&iecy;&tcy;&kcy;&ucy;, &ncy;&acy;&dcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &vcy;&ycy; &scy;&iecy;&jcy;&chcy;&acy;&scy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;&iecy;, &icy; &vcy;&ycy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&iecy; &scy; &ocy;&zhcy;&icy;&dcy;&acy;&ncy;&icy;&yacy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &ncy;&acy;&dcy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>master</code> .</span></p> <p><span data-i18n="5a49db9a6baaf4aaf8d75a2e220634d4b4c8812f2939f4a47ee0de9332f37579/be" data-source="However, this is only a convention, and you can name your branches anything you want, and don&amp;rsquo;t have to ever even &lt;code&gt;have&lt;/code&gt; a &lt;code&gt;master&lt;/code&gt; branch. A number of the Git tools will assume that &lt;code&gt;.git/HEAD&lt;/code&gt; is valid, though." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &ecy;&tcy;&ocy; &vcy;&scy;&iecy;&gcy;&ocy; &lcy;&icy;&shcy;&softcy; &scy;&ocy;&gcy;&lcy;&acy;&shcy;&iecy;&ncy;&icy;&iecy;, &icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &scy;&vcy;&ocy;&icy; &vcy;&iecy;&tcy;&kcy;&icy; &kcy;&acy;&kcy; &ucy;&gcy;&ocy;&dcy;&ncy;&ocy;, &icy; &vcy;&acy;&mcy; &dcy;&acy;&zhcy;&iecy; &ncy;&iecy; &ocy;&bcy;&yacy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>have</code>  &kcy;&acy;&kcy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>master</code> . &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &rcy;&yacy;&dcy; &icy;&ncy;&scy;&tcy;&rcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy;  Git  &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&yucy;&tcy;, &chcy;&tcy;&ocy;  <code>.git/HEAD</code>  &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&iecy;&ncy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="7cf097f60c2c125d3e92045389a1292237a907c1dfc02c30f6c38b617a2a670b/77" data-source="An &lt;em&gt;object&lt;/em&gt; is identified by its 160-bit SHA-1 hash, aka &lt;em&gt;object name&lt;/em&gt;, and a reference to an object is always the 40-byte hex representation of that SHA-1 name. The files in the &lt;code&gt;refs&lt;/code&gt; subdirectory are expected to contain these hex references (usually with a final &lt;code&gt;\n&lt;/code&gt; at the end), and you should thus expect to see a number of 41-byte files containing these references in these &lt;code&gt;refs&lt;/code&gt; subdirectories when you actually start populating your tree." onmousemove="i18n(this)">&Ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &icy;&dcy;&iecy;&ncy;&tcy;&icy;&fcy;&icy;&tscy;&icy;&rcy;&ucy;&iecy;&tcy;&scy;&yacy; &pcy;&ocy; 160-&bcy;&icy;&tcy;&ncy;&ocy;&mcy;&ucy; &khcy;&iecy;&shcy;&ucy; SHA-1, &tcy;&acy;&kcy;&zhcy;&iecy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy;&mcy;&ucy; &kcy;&acy;&kcy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;, &acy; &scy;&scy;&ycy;&lcy;&kcy;&acy; &ncy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; 40-&bcy;&acy;&jcy;&tcy;&ocy;&vcy;&ocy;&iecy; &shcy;&iecy;&scy;&tcy;&ncy;&acy;&dcy;&tscy;&acy;&tcy;&iecy;&rcy;&icy;&chcy;&ncy;&ocy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &icy;&mcy;&iecy;&ncy;&icy; SHA-1. &Ocy;&zhcy;&icy;&dcy;&acy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>refs</code>  &bcy;&ucy;&dcy;&ucy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &ecy;&tcy;&icy; &shcy;&iecy;&scy;&tcy;&ncy;&acy;&dcy;&tscy;&acy;&tcy;&iecy;&rcy;&icy;&chcy;&ncy;&ycy;&iecy; &scy;&scy;&ycy;&lcy;&kcy;&icy; (&ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &scy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&mcy;  <code>\n</code>  &vcy; &kcy;&ocy;&ncy;&tscy;&iecy;), &icy; &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &vcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &ocy;&zhcy;&icy;&dcy;&acy;&tcy;&softcy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; 41-&bcy;&acy;&jcy;&tcy;&ocy;&vcy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&khcy; &ecy;&tcy;&icy; &scy;&scy;&ycy;&lcy;&kcy;&icy;, &vcy; &ecy;&tcy;&icy;&khcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;&khcy;  <code>refs</code> , &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &ncy;&acy;&chcy;&ncy;&iecy;&tcy;&iecy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; &tcy;&vcy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;.</span></td> </tr> </table></div> </div> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="a2867546c551494b869dcc590a6adbfda4fa67b824f5b5f6491b3229b9e13aed/9b" data-source="An advanced user may want to take a look at &lt;a href=&quot;gitrepository-layout&quot;&gt;gitrepository-layout[5]&lt;/a&gt; after finishing this tutorial." onmousemove="i18n(this)">&Ocy;&pcy;&ycy;&tcy;&ncy;&ycy;&jcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &zcy;&acy;&khcy;&ocy;&tcy;&iecy;&tcy;&softcy; &vcy;&zcy;&gcy;&lcy;&yacy;&ncy;&ucy;&tcy;&softcy; &ncy;&acy;  <a href="gitrepository-layout.html">gitrepository-layout[5]</a>  &pcy;&ocy;&scy;&lcy;&iecy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&icy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &rcy;&ucy;&kcy;&ocy;&vcy;&ocy;&dcy;&scy;&tcy;&vcy;&acy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="cc7a700d8549a8ad6f1f74937484248c8655ff60dea575f8f957ef9d3787bda9/30" data-source="You have now created your first Git repository. Of course, since it&amp;rsquo;s empty, that&amp;rsquo;s not very useful, so let&amp;rsquo;s start populating it with data." onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy; &scy;&vcy;&ocy;&jcy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  Git . &Kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ocy;&ncy; &pcy;&ucy;&scy;&tcy;, &ecy;&tcy;&ocy; &ncy;&iecy; &ocy;&chcy;&iecy;&ncy;&softcy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &ncy;&acy;&chcy;&ncy;&iecy;&mcy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; &iecy;&gcy;&ocy; &dcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_populating_a_git_repository"><span data-i18n="1fda49e587f78626787e83402ee16a0b231dec3a6c5ec32b2b2debfa6383c21a/8b" data-source="Populating a git repository" onmousemove="i18n(this)">&Zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  git</span></h2> <div> <p><span data-i18n="b1d0c70ea388159b85c0242bf28be6f54eab9228e58219c2206e962b78de9203/06" data-source="We&amp;rsquo;ll keep this simple and stupid, so we&amp;rsquo;ll start off with populating a few trivial files just to get a feel for it." onmousemove="i18n(this)">&Mcy;&ycy; &ocy;&scy;&tcy;&acy;&vcy;&icy;&mcy; &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ycy;&mcy; &icy; &gcy;&lcy;&ucy;&pcy;&ycy;&mcy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &ncy;&acy;&chcy;&ncy;&iecy;&mcy; &scy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&chcy;&ucy;&vcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;.</span></p> <p><span data-i18n="4ff6446690ebea8a3a95f0c3792e6bd1dc8eb43d8feb1062b98960e9115ab352/fe" data-source="Start off with just creating any random files that you want to maintain in your Git repository. We&amp;rsquo;ll start off with a few bad examples, just to get a feel for how this works:" onmousemove="i18n(this)">&Ncy;&acy;&chcy;&ncy;&icy;&tcy;&iecy; &scy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy; &scy;&lcy;&ucy;&chcy;&acy;&jcy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; &vcy; &scy;&vcy;&ocy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;  Git . &Mcy;&ycy; &ncy;&acy;&chcy;&ncy;&iecy;&mcy; &scy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &pcy;&lcy;&ocy;&khcy;&icy;&khcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&ocy;&vcy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&ncy;&yacy;&tcy;&softcy;, &kcy;&acy;&kcy; &ecy;&tcy;&ocy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;Hello World&quot;</span> &gt;hello</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;Silly example&quot;</span> &gt;example</span></pre> </div> </div> <p><span data-i18n="a9bda5756e21a597c6f15747eb9cd878ac1046254988de560ad727cc8ece9580/c0" data-source="you have now created two files in your working tree (aka &lt;code&gt;working directory&lt;/code&gt;), but to actually check in your hard work, you will have to go through two steps:" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy; &dcy;&vcy;&acy; &fcy;&acy;&jcy;&lcy;&acy; &vcy; &scy;&vcy;&ocy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; (&tcy;&acy;&kcy;&zhcy;&iecy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy;&mcy; &kcy;&acy;&kcy;  <code>working directory</code> ), &ncy;&ocy; &chcy;&tcy;&ocy;&bcy;&ycy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;&softcy; &scy;&vcy;&ocy;&yucy; &tcy;&yacy;&zhcy;&iecy;&lcy;&ucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;, &vcy;&acy;&mcy; &pcy;&rcy;&icy;&dcy;&iecy;&tcy;&scy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &dcy;&vcy;&acy; &shcy;&acy;&gcy;&acy;:</span></p> <div> <ul> <li> <p><span data-i18n="619b0657a787809a89eef731f0e867678e4ab35136cb42889df7069eac2bc6ba/7c" data-source="fill in the &lt;code&gt;index&lt;/code&gt; file (aka &lt;code&gt;cache&lt;/code&gt;) with the information about your working tree state." onmousemove="i18n(this)">&zcy;&acy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy; &fcy;&acy;&jcy;&lcy;  <code>index</code>  (&ocy;&ncy; &zhcy;&iecy;  <code>cache</code> ) &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&iecy;&jcy; &ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;.</span></p> </li> <li> <p><span data-i18n="267bd2687aaed551297c462c91ed38504f0ae7f02d04f10f86547cf379787355/67" data-source="commit that index file as an object." onmousemove="i18n(this)">&zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &ecy;&tcy;&ocy;&tcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &kcy;&acy;&kcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;.</span></p> </li> </ul> </div> <p><span data-i18n="f0cf4f513ac69e198167469ccc7c72b907928759588e6a8073c4c5a0652abd63/3b" data-source="The first step is trivial: when you want to tell Git about any changes to your working tree, you use the &lt;code&gt;git update-index&lt;/code&gt; program. That program normally just takes a list of filenames you want to update, but to avoid trivial mistakes, it refuses to add new entries to the index (or remove existing ones) unless you explicitly tell it that you&amp;rsquo;re adding a new entry with the &lt;code&gt;--add&lt;/code&gt; flag (or removing an entry with the &lt;code&gt;--remove&lt;/code&gt;) flag." onmousemove="i18n(this)">&Pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &shcy;&acy;&gcy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&iecy;&ncy;: &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&softcy;  Git  &ocy; &lcy;&yucy;&bcy;&ycy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;&khcy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &vcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&ucy;  <code>git update-index</code> . &Ecy;&tcy;&acy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&acy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &bcy;&iecy;&rcy;&iecy;&tcy; &scy;&pcy;&icy;&scy;&ocy;&kcy; &icy;&mcy;&iecy;&ncy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy;, &ncy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &icy;&zcy;&bcy;&iecy;&zhcy;&acy;&tcy;&softcy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &ocy;&shcy;&icy;&bcy;&ocy;&kcy;, &ocy;&ncy;&acy; &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&tcy;&softcy; &ncy;&ocy;&vcy;&ycy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; (&icy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&yacy;&tcy;&softcy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&iecy;), &iecy;&scy;&lcy;&icy; &vcy;&ycy; &yacy;&vcy;&ncy;&ocy; &ncy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&iecy; &iecy;&jcy;, &chcy;&tcy;&ocy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy;&iecy; &ncy;&ocy;&vcy;&ucy;&yucy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &Fcy;&lcy;&acy;&gcy;  <code>--add</code>  (&icy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&icy; &scy; &fcy;&lcy;&acy;&gcy;&ocy;&mcy;  <code>--remove</code> ).</span></p> <p><span data-i18n="3dce9bb85ce8fce780add95dcb7b03c6a722752d67072be2b4f9bc4114702f0b/56" data-source="So to populate the index with the two files you just created, you can do" onmousemove="i18n(this)">&Icy;&tcy;&acy;&kcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &dcy;&vcy;&ucy;&mcy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ycy;&mcy;&icy; &fcy;&acy;&jcy;&lcy;&acy;&mcy;&icy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">update</span><span class="hljs-operator">-</span>index <span class="hljs-comment" title="--add hello example">--&dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy; &pcy;&rcy;&icy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&yacy;</span></pre> </div> </div> <p><span data-i18n="2da84ff09478ec769acb7868b8dca3d5c50d30c9baab12dfda91b54dc198b3b4/4d" data-source="and you have now told Git to track those two files." onmousemove="i18n(this)">&icy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &scy;&kcy;&acy;&zcy;&acy;&lcy;&icy;  Git  &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&icy; &dcy;&vcy;&acy; &fcy;&acy;&jcy;&lcy;&acy;.</span></p> <p><span data-i18n="79ecd2bbb64535809d02e43b4ec495a443f6558ca02df3936dea657dda00c571/c0" data-source="In fact, as you did that, if you now look into your object directory, you&amp;rsquo;ll notice that Git will have added two new objects to the object database. If you did exactly the steps above, you should now be able to do" onmousemove="i18n(this)">&Fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &ecy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &zcy;&acy;&gcy;&lcy;&yacy;&ncy;&iecy;&tcy;&iecy; &vcy; &scy;&vcy;&ocy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;, &vcy;&ycy; &zcy;&acy;&mcy;&iecy;&tcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy;  Git  &dcy;&ocy;&bcy;&acy;&vcy;&icy;&lcy; &dcy;&vcy;&acy; &ncy;&ocy;&vcy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &vcy; &bcy;&acy;&zcy;&ucy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;. &IEcy;&scy;&lcy;&icy; &vcy;&ycy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&lcy;&icy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ycy;&iecy; &vcy;&ycy;&shcy;&iecy; &shcy;&acy;&gcy;&icy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &scy;&mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">ls</span> .git/objects/??/*</span></pre> </div> </div> <p><span data-i18n="e6999cf86760c87e82ea21aceda95aa249c370b6a674ae73b048fbf2f963dc3c/27" data-source="and see two files:" onmousemove="i18n(this)">&icy; &vcy;&icy;&dcy;&icy;&mcy; &dcy;&vcy;&acy; &fcy;&acy;&jcy;&lcy;&acy;:</span></p> <div> <div> <pre class="hljs language-bash">.git/objects/55/7db03de997c86a4a028e1ebd3a1ceb225be238
.git/objects/f2/4c74a2e500f5ee1332c86b94199f52b1d1d962</pre> </div> </div> <p><span data-i18n="41cb2e775ac48fa7ef35a8be30a1c9fb189eb9541f1ccb9c67fb91fc0b517be4/31" data-source="which correspond with the objects with names of &lt;code&gt;557db...&lt;/code&gt; and &lt;code&gt;f24c7...&lt;/code&gt; respectively." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&tcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;&mcy; &scy; &icy;&mcy;&iecy;&ncy;&acy;&mcy;&icy;  <code>557db...</code>  &icy;  <code>f24c7...</code>  &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;.</span></p> <p><span data-i18n="7f9b22909831463bb91de2424ba333b89625b321995247210a5042a93e74dd84/50" data-source="If you want to, you can use &lt;code&gt;git cat-file&lt;/code&gt; to look at those objects, but you&amp;rsquo;ll have to use the object name, not the filename of the object:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git cat-file</code>  &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&acy; &ecy;&tcy;&icy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;, &ncy;&ocy; &vcy;&acy;&mcy; &pcy;&rcy;&icy;&dcy;&iecy;&tcy;&scy;&yacy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;, &acy; &ncy;&iecy; &icy;&mcy;&yacy; &fcy;&acy;&jcy;&lcy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git cat-file -t 557db03de997c86a4a028e1ebd3a1ceb225be238</pre> </div> </div> <p><span data-i18n="bf24ed2ce24bb4883a2bc508db688f2401e908a6ae8cde0d50483252121f64a8/99" data-source="where the &lt;code&gt;-t&lt;/code&gt; tells &lt;code&gt;git cat-file&lt;/code&gt; to tell you what the &amp;quot;type&amp;quot; of the object is. Git will tell you that you have a &amp;quot;blob&amp;quot; object (i.e., just a regular file), and you can see the contents with" onmousemove="i18n(this)">&gcy;&dcy;&iecy;  <code>-t</code>  &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy;  <code>git cat-file</code> , &chcy;&tcy;&ocy; &tcy;&acy;&kcy;&ocy;&iecy;  &quot;type&quot;  &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;.  Git  &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy; &vcy;&acy;&mcy;, &chcy;&tcy;&ocy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;  &quot;blob&quot;  (&tcy;. &iecy;. &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;), &icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &iecy;&gcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git cat-file blob 557db03</pre> </div> </div> <p><span data-i18n="7844cf1e343363f2748828fe807dcbe0ba66793257b09ba4e909306e7ee4c8a9/8c" data-source="which will print out &amp;quot;Hello World&amp;quot;. The object &lt;code&gt;557db03&lt;/code&gt; is nothing more than the contents of your file &lt;code&gt;hello&lt;/code&gt;." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &rcy;&acy;&scy;&pcy;&iecy;&chcy;&acy;&tcy;&acy;&iecy;&tcy;  &quot;Hello World&quot; . &Ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;  <code>557db03</code>  &mdash; &ecy;&tcy;&ocy; &ncy;&iecy; &chcy;&tcy;&ocy; &icy;&ncy;&ocy;&iecy;, &kcy;&acy;&kcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;  <code>hello</code> .</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="ea4091e9dfd272e8ba6f0660016cb1e07c4aea48d462881e34da3e111f811c3e/67" data-source="Don&amp;rsquo;t confuse that object with the file &lt;code&gt;hello&lt;/code&gt; itself. The object is literally just those specific &lt;strong&gt;contents&lt;/strong&gt; of the file, and however much you later change the contents in file &lt;code&gt;hello&lt;/code&gt;, the object we just looked at will never change. Objects are immutable." onmousemove="i18n(this)">&Ncy;&iecy; &pcy;&ucy;&tcy;&acy;&jcy;&tcy;&iecy; &ecy;&tcy;&ocy;&tcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &scy; &scy;&acy;&mcy;&icy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy;  <code>hello</code> . &Ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &bcy;&ucy;&kcy;&vcy;&acy;&lcy;&softcy;&ncy;&ocy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&ocy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &fcy;&acy;&jcy;&lcy;&acy;, &icy; &scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &bcy;&ycy; &vcy;&ycy; &pcy;&ocy;&zcy;&zhcy;&iecy; &ncy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&icy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &fcy;&acy;&jcy;&lcy;&acy;  <code>hello</code> , &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &rcy;&acy;&scy;&scy;&mcy;&ocy;&tcy;&rcy;&iecy;&lcy;&icy;, &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&tcy;&scy;&yacy;. &Ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy; &ncy;&iecy;&icy;&zcy;&mcy;&iecy;&ncy;&yacy;&iecy;&mcy;&ycy;.</span></td> </tr> </table></div> </div> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="94afa6f48c6f6fba9d76e76c78ee9e8ad09e7b67642754162f767491f30a6d43/7b" data-source="The second example demonstrates that you can abbreviate the object name to only the first several hexadecimal digits in most places." onmousemove="i18n(this)">&Vcy;&tcy;&ocy;&rcy;&ocy;&jcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy; &dcy;&iecy;&mcy;&ocy;&ncy;&scy;&tcy;&rcy;&icy;&rcy;&ucy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&iecy; &mcy;&iecy;&scy;&tcy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &mcy;&ocy;&zhcy;&ncy;&ocy; &scy;&ocy;&kcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &dcy;&ocy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &pcy;&iecy;&rcy;&vcy;&ycy;&khcy; &shcy;&iecy;&scy;&tcy;&ncy;&acy;&dcy;&tscy;&acy;&tcy;&iecy;&rcy;&icy;&chcy;&ncy;&ycy;&khcy; &tscy;&icy;&fcy;&rcy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="c3a23ebe972925a814b8a806cf933341dbde83e8a91f7ac7ae979ec2f2e11c74/94" data-source="Anyway, as we mentioned previously, you normally never actually take a look at the objects themselves, and typing long 40-character hex names is not something you&amp;rsquo;d normally want to do. The above digression was just to show that &lt;code&gt;git update-index&lt;/code&gt; did something magical, and actually saved away the contents of your files into the Git object database." onmousemove="i18n(this)">&Vcy; &lcy;&yucy;&bcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &kcy;&acy;&kcy; &mcy;&ycy; &ucy;&pcy;&ocy;&mcy;&icy;&ncy;&acy;&lcy;&icy; &rcy;&acy;&ncy;&iecy;&iecy;, &vcy;&ycy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &scy;&mcy;&ocy;&tcy;&rcy;&icy;&tcy;&iecy; &ncy;&acy; &scy;&acy;&mcy;&icy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &acy; &vcy;&vcy;&ocy;&dcy; &dcy;&lcy;&icy;&ncy;&ncy;&ycy;&khcy; 40-&scy;&icy;&mcy;&vcy;&ocy;&lcy;&softcy;&ncy;&ycy;&khcy; &shcy;&iecy;&scy;&tcy;&ncy;&acy;&dcy;&tscy;&acy;&tcy;&iecy;&rcy;&icy;&chcy;&ncy;&ycy;&khcy; &icy;&mcy;&iecy;&ncy; &mdash; &ecy;&tcy;&ocy; &ncy;&iecy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &khcy;&ocy;&tcy;&iecy;&lcy;&ocy;&scy;&softcy; &bcy;&ycy; &dcy;&iecy;&lcy;&acy;&tcy;&softcy;. &Vcy;&ycy;&shcy;&iecy;&ucy;&pcy;&ocy;&mcy;&yacy;&ncy;&ucy;&tcy;&ocy;&iecy; &ocy;&tcy;&scy;&tcy;&ucy;&pcy;&lcy;&iecy;&ncy;&icy;&iecy; &bcy;&ycy;&lcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&ncy;&ocy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &dcy;&lcy;&yacy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy;  <code>git update-index</code>  &scy;&dcy;&iecy;&lcy;&acy;&lcy; &chcy;&tcy;&ocy;-&tcy;&ocy; &vcy;&ocy;&lcy;&shcy;&iecy;&bcy;&ncy;&ocy;&iecy; &icy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&lcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &vcy;&acy;&shcy;&icy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ncy;&ucy;&yucy; &bcy;&acy;&zcy;&ucy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy;  Git .</span></p> <p><span data-i18n="d6c7f3a4e67e9cd1933cc1fb37b0b077a24ff3768d2b1a4db25634bf40e55256/e0" data-source="Updating the index did something else too: it created a &lt;code&gt;.git/index&lt;/code&gt; file. This is the index that describes your current working tree, and something you should be very aware of. Again, you normally never worry about the index file itself, but you should be aware of the fact that you have not actually really &amp;quot;checked in&amp;quot; your files into Git so far, you&amp;rsquo;ve only &lt;strong&gt;told&lt;/strong&gt; Git about them." onmousemove="i18n(this)">&Ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &pcy;&rcy;&icy;&vcy;&iecy;&lcy;&ocy; &icy; &kcy; &iecy;&shchcy;&iecy; &ocy;&dcy;&ncy;&ocy;&mcy;&ucy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ucy;: &bcy;&ycy;&lcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy; &fcy;&acy;&jcy;&lcy;  <code>.git/index</code> . &Ecy;&tcy;&ocy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;, &ocy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&yucy;&shchcy;&icy;&jcy; &vcy;&acy;&shcy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &icy; &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &ocy;&bcy; &ecy;&tcy;&ocy;&mcy; &khcy;&ocy;&rcy;&ocy;&shcy;&ocy; &zcy;&ncy;&acy;&tcy;&softcy;. &Ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;, &vcy;&ycy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &bcy;&iecy;&scy;&pcy;&ocy;&kcy;&ocy;&icy;&tcy;&iecy;&scy;&softcy; &ocy; &scy;&acy;&mcy;&ocy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;, &ncy;&ocy; &vcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &ocy;&scy;&ocy;&zcy;&ncy;&acy;&vcy;&acy;&tcy;&softcy; &tcy;&ocy;&tcy; &fcy;&acy;&kcy;&tcy;, &chcy;&tcy;&ocy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &vcy;&ycy; &iecy;&shchcy;&iecy; &ncy;&iecy; &pcy;&rcy;&iecy;&vcy;&rcy;&acy;&tcy;&icy;&lcy;&icy; &scy;&vcy;&ocy;&icy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy;  Git , &vcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&lcy;&icy; &ocy; &ncy;&icy;&khcy;  Git .</span></p> <p><span data-i18n="b2552b501d74a524a0b0e65618960621aaa928c1cacaa0e73b048262f3e13b5c/9f" data-source="However, since Git knows about them, you can now start using some of the most basic Git commands to manipulate the files or look at their status." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy;  Git  &zcy;&ncy;&acy;&iecy;&tcy; &ocy; &ncy;&icy;&khcy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&chcy;&acy;&tcy;&softcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &icy;&zcy; &scy;&acy;&mcy;&ycy;&khcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ycy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;  Git  &dcy;&lcy;&yacy; &ucy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &fcy;&acy;&jcy;&lcy;&acy;&mcy;&icy; &icy;&lcy;&icy; &pcy;&rcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&acy; &icy;&khcy; &scy;&tcy;&acy;&tcy;&ucy;&scy;&acy;.</span></p> <p><span data-i18n="d177147ae2b860d4ca68a67883f9b056440345b5a1d78b1b8b3440620c6e37a6/c9" data-source="In particular, let&amp;rsquo;s not even check in the two files into Git yet, we&amp;rsquo;ll start off by adding another line to &lt;code&gt;hello&lt;/code&gt; first:" onmousemove="i18n(this)">&Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&scy;&tcy;&icy;, &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&ocy;&kcy;&acy; &dcy;&acy;&zhcy;&iecy; &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&mcy; &rcy;&iecy;&gcy;&icy;&scy;&tcy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&icy; &dcy;&vcy;&acy; &fcy;&acy;&jcy;&lcy;&acy; &vcy;  Git , &mcy;&ycy; &ncy;&acy;&chcy;&ncy;&iecy;&mcy; &scy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &iecy;&shchcy;&iecy; &ocy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &vcy;  <code>hello</code> :</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;It&apos;s a new day for git&quot;</span> &gt;&gt;hello</span></pre> </div> </div> <p><span data-i18n="9daf245230b86ef5e74c8251a2c9bce8ce2e7a907757eb664c728092bf4c8fc4/d6" data-source="and you can now, since you told Git about the previous state of &lt;code&gt;hello&lt;/code&gt;, ask Git what has changed in the tree compared to your old index, using the &lt;code&gt;git diff-files&lt;/code&gt; command:" onmousemove="i18n(this)">&icy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &vcy;&ycy; &rcy;&acy;&scy;&scy;&kcy;&acy;&zcy;&acy;&lcy;&icy;  Git  &ocy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy;  <code>hello</code> , &scy;&pcy;&rcy;&ocy;&scy;&icy;&tcy;&softcy;  Git , &chcy;&tcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&ocy;&scy;&softcy; &vcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &pcy;&ocy; &scy;&rcy;&acy;&vcy;&ncy;&iecy;&ncy;&icy;&yucy; &scy; &vcy;&acy;&shcy;&icy;&mcy; &scy;&tcy;&acy;&rcy;&ycy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ocy;&mcy;, &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git diff-files</code> :</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git diff-files</pre> </div> </div> <p><span data-i18n="dcdf33f878bc20712d75906128f56461ff37f56a9f5737304d974f0eea821afc/ff" data-source="Oops. That wasn&amp;rsquo;t very readable. It just spit out its own internal version of a &lt;code&gt;diff&lt;/code&gt;, but that internal version really just tells you that it has noticed that &amp;quot;hello&amp;quot; has been modified, and that the old object contents it had have been replaced with something else." onmousemove="i18n(this)">&Ucy;&pcy;&scy;. &Ecy;&tcy;&ocy; &bcy;&ycy;&lcy;&ocy; &ncy;&iecy; &ocy;&chcy;&iecy;&ncy;&softcy; &chcy;&icy;&tcy;&acy;&bcy;&iecy;&lcy;&softcy;&ncy;&ocy;. &Ocy;&ncy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&ycy;&dcy;&acy;&iecy;&tcy; &scy;&vcy;&ocy;&yucy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ucy;&yucy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&yucy;&yucy; &vcy;&iecy;&rcy;&scy;&icy;&yucy;  <code>diff</code> , &ncy;&ocy; &ecy;&tcy;&acy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&yacy;&yacy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy; &vcy;&acy;&mcy;, &chcy;&tcy;&ocy; &ocy;&ncy; &zcy;&acy;&mcy;&iecy;&tcy;&icy;&lcy;, &chcy;&tcy;&ocy;  &quot;hello&quot;  &bcy;&ycy;&lcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;, &icy; &chcy;&tcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &scy;&tcy;&acy;&rcy;&ocy;&gcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &bcy;&ycy;&lcy;&ocy; &zcy;&acy;&mcy;&iecy;&ncy;&iecy;&ncy;&ocy; &chcy;&iecy;&mcy;-&tcy;&ocy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;.</span></p> <p><span data-i18n="cadb0cf86ee4d4276e29f51afe1113b6975982b6c3fb68978b1b3426f4e5b71e/be" data-source="To make it readable, we can tell &lt;code&gt;git diff-files&lt;/code&gt; to output the differences as a patch, using the &lt;code&gt;-p&lt;/code&gt; flag:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &chcy;&icy;&tcy;&acy;&bcy;&iecy;&lcy;&softcy;&ncy;&ycy;&mcy;, &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;  <code>git diff-files</code>  &vcy;&ycy;&vcy;&ocy;&dcy;&icy;&tcy;&softcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&yacy; &vcy; &vcy;&icy;&dcy;&iecy; &pcy;&acy;&tcy;&chcy;&acy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy; &fcy;&lcy;&acy;&gcy;  <code>-p</code> :</span></p> <div> <div> <pre class="hljs language-diff">$ git diff-files -p
<span class="hljs-comment">diff --git a/hello b/hello</span>
<span class="hljs-comment">index 557db03..263414f 100644</span>
<span class="hljs-comment">--- a/hello</span>
<span class="hljs-comment">+++ b/hello</span>
@@ -1 +1,2 @@
 Hello World
<span class="hljs-addition">+It&apos;s a new day for git</span></pre> </div> </div> <p><span data-i18n="691e7f2ff4103b6b08cdbf7d7b3c46172701a24bc266e687607f9053a21170d4/ae" data-source="i.e. the diff of the change we caused by adding another line to &lt;code&gt;hello&lt;/code&gt;." onmousemove="i18n(this)">&tcy;.&iecy;. &rcy;&acy;&zcy;&ncy;&icy;&tscy;&acy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &mcy;&ycy; &vcy;&ycy;&zcy;&vcy;&acy;&lcy;&icy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy;&mcy; &iecy;&shchcy;&iecy; &ocy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &vcy;  <code>hello</code> .</span></p> <p><span data-i18n="908ec1a3959fda8a67731f066a39697d2381f4fa091bbe04e5f4d437d7a4a471/ce" data-source="In other words, &lt;code&gt;git diff-files&lt;/code&gt; always shows us the difference between what is recorded in the index, and what is currently in the working tree. That&amp;rsquo;s very useful." onmousemove="i18n(this)">&Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;,  <code>git diff-files</code>  &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy;&mcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy; &mcy;&iecy;&zhcy;&dcy;&ucy; &tcy;&iecy;&mcy;, &chcy;&tcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ocy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;, &icy; &tcy;&iecy;&mcy;, &chcy;&tcy;&ocy; &scy;&iecy;&jcy;&chcy;&acy;&scy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Ecy;&tcy;&ocy; &ocy;&chcy;&iecy;&ncy;&softcy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy;.</span></p> <p><span data-i18n="a0c02dfcf5d6feb2c7b944290df93ffdb9d5315a3b93c20a94364fa31b927521/65" data-source="A common shorthand for &lt;code&gt;git diff-files -p&lt;/code&gt; is to just write &lt;code&gt;git
diff&lt;/code&gt;, which will do the same thing." onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&iecy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&iecy;  <code>git diff-files -p</code>  &mdash; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ncy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy;  <code>git
diff</code> , &chcy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy; &tcy;&ocy; &zhcy;&iecy; &scy;&acy;&mcy;&ocy;&iecy;.</span></p> <div> <div> <pre class="hljs language-diff">$ git diff
<span class="hljs-comment" title="diff --git a/hello b/hello">diff --git &acy;/&pcy;&rcy;&icy;&vcy;&iecy;&tcy; &bcy;/&pcy;&rcy;&icy;&vcy;&iecy;&tcy;</span>
<span class="hljs-comment" title="index 557db03..263414f 100644">&icy;&ncy;&dcy;&iecy;&kcy;&scy; 557db03..263414f 100644</span>
<span class="hljs-comment">--- a/hello</span>
<span class="hljs-comment">+++ b/hello</span>
@@ -1 +1,2 @@
 Hello World
<span class="hljs-addition">+It&apos;s a new day for git</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_committing_git_state"><span data-i18n="2bcfc62f1f216031b998c722ece9ad922893bb7ddbb93f6f12910dd2ce44ebdb/b8" data-source="Committing git state" onmousemove="i18n(this)">&Fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy;  git</span></h2> <div> <p><span data-i18n="6db473713b778583e6d94817e70ff218a5261b3242a2f84544a48765f5894e6b/28" data-source="Now, we want to go to the next stage in Git, which is to take the files that Git knows about in the index, and commit them as a real tree. We do that in two phases: creating a &lt;code&gt;tree&lt;/code&gt; object, and committing that &lt;code&gt;tree&lt;/code&gt; object as a &lt;code&gt;commit&lt;/code&gt; object together with an explanation of what the tree was all about, along with information of how we came to that state." onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &mcy;&ycy; &khcy;&ocy;&tcy;&icy;&mcy; &pcy;&iecy;&rcy;&iecy;&jcy;&tcy;&icy; &kcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&mcy;&ucy; &ecy;&tcy;&acy;&pcy;&ucy; &vcy;  Git : &vcy;&zcy;&yacy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;&ycy;, &ocy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy;  Git  &zcy;&ncy;&acy;&iecy;&tcy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;, &icy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &icy;&khcy; &kcy;&acy;&kcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;. &Mcy;&ycy; &dcy;&iecy;&lcy;&acy;&iecy;&mcy; &ecy;&tcy;&ocy; &vcy; &dcy;&vcy;&acy; &ecy;&tcy;&acy;&pcy;&acy;: &scy;&ocy;&zcy;&dcy;&acy;&iecy;&mcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;  <code>tree</code>  &icy; &fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&iecy;&mcy; &ecy;&tcy;&ocy;&tcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;  <code>tree</code>  &kcy;&acy;&kcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;  <code>commit</code>  &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &scy; &ocy;&bcy;&hardcy;&yacy;&scy;&ncy;&iecy;&ncy;&icy;&iecy;&mcy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&iecy;&jcy; &ocy; &tcy;&ocy;&mcy;, &kcy;&acy;&kcy; &mcy;&ycy; &pcy;&rcy;&icy;&shcy;&lcy;&icy; &kcy; &ecy;&tcy;&ocy;&mcy;&ucy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yucy;.</span></p> <p><span data-i18n="03a97078052cb7456aab9e564aa385e35f7ff8f318ca290e325ceaaafbbfc5f9/73" data-source="Creating a tree object is trivial, and is done with &lt;code&gt;git write-tree&lt;/code&gt;. There are no options or other input: &lt;code&gt;git write-tree&lt;/code&gt; will take the current index state, and write an object that describes that whole index. In other words, we&amp;rsquo;re now tying together all the different filenames with their contents (and their permissions), and we&amp;rsquo;re creating the equivalent of a Git &amp;quot;directory&amp;quot; object:" onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ocy; &icy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy;&scy;&yacy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git write-tree</code> . &Ncy;&icy;&kcy;&acy;&kcy;&icy;&khcy; &ocy;&pcy;&tscy;&icy;&jcy; &icy;&lcy;&icy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &vcy;&khcy;&ocy;&dcy;&ncy;&ycy;&khcy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy; &ncy;&iecy;&tcy;:  <code>git write-tree</code>  &vcy;&ocy;&zcy;&softcy;&mcy;&iecy;&tcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy; &ncy;&acy;&pcy;&icy;&shcy;&iecy;&tcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;, &ocy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&yucy;&shchcy;&icy;&jcy; &vcy;&iecy;&scy;&softcy; &ecy;&tcy;&ocy;&tcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;. &Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &mcy;&ycy; &scy;&vcy;&yacy;&zcy;&ycy;&vcy;&acy;&iecy;&mcy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &vcy;&scy;&iecy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&iecy; &icy;&mcy;&iecy;&ncy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &scy; &icy;&khcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ycy;&mcy; (&icy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&icy;&yacy;&mcy;&icy;) &icy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&mcy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;  Git   &quot;directory&quot; :</span></p> <div> <div> <pre class="hljs language-lua">$ git <span class="hljs-built_in">write</span>-tree</pre> </div> </div> <p><span data-i18n="ebeb4fffa16f988c7af3605a75289abed21610b5b3e89e525da72c380a51f973/e4" data-source="and this will just output the name of the resulting tree, in this case (if you have done exactly as I&amp;rsquo;ve described) it should be" onmousemove="i18n(this)">&icy; &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&ycy;&vcy;&iecy;&dcy;&iecy;&tcy; &icy;&mcy;&yacy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; (&iecy;&scy;&lcy;&icy; &vcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &tcy;&acy;&kcy;, &kcy;&acy;&kcy; &yacy; &ocy;&pcy;&icy;&scy;&acy;&lcy;) &ocy;&ncy;&ocy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ocy; &bcy;&ycy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-undefined">8988da15d077d4829fc51d8544c097def6644dbb</pre> </div> </div> <p><span data-i18n="3370dc9c1006e91e81883daec87bf5c2c1bc59b60ceaa3486d6bbdd62782e44e/d1" data-source="which is another incomprehensible object name. Again, if you want to, you can use &lt;code&gt;git cat-file -t 8988d...&lt;/code&gt; to see that this time the object is not a &amp;quot;blob&amp;quot; object, but a &amp;quot;tree&amp;quot; object (you can also use &lt;code&gt;git cat-file&lt;/code&gt; to actually output the raw object contents, but you&amp;rsquo;ll see mainly a binary mess, so that&amp;rsquo;s less interesting)." onmousemove="i18n(this)">&ecy;&tcy;&ocy; &iecy;&shchcy;&iecy; &ocy;&dcy;&ncy;&ocy; &ncy;&iecy;&pcy;&ocy;&ncy;&yacy;&tcy;&ncy;&ocy;&iecy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;. &Ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git cat-file -t 8988d...</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &chcy;&tcy;&ocy; &ncy;&acy; &ecy;&tcy;&ocy;&tcy; &rcy;&acy;&zcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ncy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&mcy;  &quot;blob&quot; , &acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&mcy;  &quot;tree&quot;  (&vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git cat-file</code>  &dcy;&lcy;&yacy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&gcy;&ocy; &vcy;&ycy;&vcy;&ocy;&dcy;&acy; &ncy;&iecy;&ocy;&bcy;&rcy;&acy;&bcy;&ocy;&tcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&gcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;, &ncy;&ocy; &vcy;&ycy; &ucy;&vcy;&icy;&dcy;&icy;&tcy;&iecy; &vcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy; &dcy;&vcy;&ocy;&icy;&chcy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;). &bcy;&iecy;&scy;&pcy;&ocy;&rcy;&yacy;&dcy;&ocy;&kcy;, &tcy;&acy;&kcy; &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &mcy;&iecy;&ncy;&iecy;&iecy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&ocy;).</span></p> <p><span data-i18n="53ccca29e554f931eb9083e89db3c4fdb306002c90df3d5f2cef05b605610ab6/d7" data-source="However &amp;mdash; normally you&amp;rsquo;d never use &lt;code&gt;git write-tree&lt;/code&gt; on its own, because normally you always commit a tree into a commit object using the &lt;code&gt;git commit-tree&lt;/code&gt; command. In fact, it&amp;rsquo;s easier to not actually use &lt;code&gt;git write-tree&lt;/code&gt; on its own at all, but to just pass its result in as an argument to &lt;code&gt;git commit-tree&lt;/code&gt;." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git write-tree</code>  &ocy;&tcy;&dcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &pcy;&ocy;&tcy;&ocy;&mcy;&ucy; &chcy;&tcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git commit-tree</code> . &Ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy;, &pcy;&rcy;&ocy;&shchcy;&iecy; &vcy;&ocy;&ocy;&bcy;&shchcy;&iecy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git write-tree</code>  &ocy;&tcy;&dcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &acy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy;  <code>git commit-tree</code>  .</span></p> <p><span data-i18n="574982185172ff120e47a46de429c20f3740f2c127524ad7728c80a10700f0ce/19" data-source="&lt;code&gt;git commit-tree&lt;/code&gt; normally takes several arguments &amp;mdash; it wants to know what the &lt;code&gt;parent&lt;/code&gt; of a commit was, but since this is the first commit ever in this new repository, and it has no parents, we only need to pass in the object name of the tree. However, &lt;code&gt;git commit-tree&lt;/code&gt; also wants to get a commit message on its standard input, and it will write out the resulting object name for the commit to its standard output." onmousemove="i18n(this)"><code>git commit-tree</code>  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&iecy;&tcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy; &mdash; &ocy;&ncy; &khcy;&ocy;&chcy;&iecy;&tcy; &zcy;&ncy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy;&icy;&mcy; &bcy;&ycy;&lcy;  <code>parent</code>  &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &ncy;&ocy; &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ecy;&tcy;&ocy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &vcy; &ecy;&tcy;&ocy;&mcy; &ncy;&ocy;&vcy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &icy; &ucy; &ncy;&iecy;&gcy;&ocy; &ncy;&iecy;&tcy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&iecy;&jcy;, &ncy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy;  <code>git commit-tree</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &khcy;&ocy;&chcy;&iecy;&tcy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &ncy;&acy; &scy;&vcy;&ocy;&jcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&jcy; &vcy;&vcy;&ocy;&dcy;, &icy; &ocy;&ncy; &zcy;&acy;&pcy;&icy;&shcy;&iecy;&tcy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ocy;&iecy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &dcy;&lcy;&yacy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &ncy;&acy; &scy;&vcy;&ocy;&jcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&jcy; &vcy;&ycy;&vcy;&ocy;&dcy;.</span></p> <p><span data-i18n="f298e284177d3de00f156e703a5e8ecd1e760b36fcd8780bbfc8b029cd2565e9/f4" data-source="And this is where we create the &lt;code&gt;.git/refs/heads/master&lt;/code&gt; file which is pointed at by &lt;code&gt;HEAD&lt;/code&gt;. This file is supposed to contain the reference to the top-of-tree of the master branch, and since that&amp;rsquo;s exactly what &lt;code&gt;git commit-tree&lt;/code&gt; spits out, we can do this all with a sequence of simple shell commands:" onmousemove="i18n(this)">&Icy; &zcy;&dcy;&iecy;&scy;&softcy; &mcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&mcy; &fcy;&acy;&jcy;&lcy;  <code>.git/refs/heads/master</code> , &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;  <code>HEAD</code> . &Pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy;&tcy; &fcy;&acy;&jcy;&lcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &ncy;&acy; &vcy;&iecy;&rcy;&shcy;&icy;&ncy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &gcy;&lcy;&acy;&vcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;, &icy; &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy;  <code>git commit-tree</code>  &vcy;&ycy;&dcy;&acy;&iecy;&tcy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &ecy;&tcy;&ocy;, &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &ecy;&tcy;&ocy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&icy; &pcy;&rcy;&ocy;&scy;&tcy;&ycy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy;:</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">tree=$(git write-tree)</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">commit=$(<span class="hljs-built_in">echo</span> <span class="hljs-string">&apos;Initial commit&apos;</span> | git commit-tree <span class="hljs-variable">$tree</span>)</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git update-ref HEAD <span class="hljs-variable">$commit</span></span></pre> </div> </div> <p><span data-i18n="e5c710613d28f5f7f24ee6becd68c0a7afbae015e71ebd3d61e4c317e5685c25/e1" data-source="In this case this creates a totally new commit that is not related to anything else. Normally you do this only &lt;strong&gt;once&lt;/strong&gt; for a project ever, and all later commits will be parented on top of an earlier commit." onmousemove="i18n(this)">&Vcy; &dcy;&acy;&ncy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ocy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;, &ncy;&iecy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&jcy; &ncy;&icy; &scy; &chcy;&iecy;&mcy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;. &Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;&iecy; &ecy;&tcy;&ocy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&icy;&ncy; &rcy;&acy;&zcy; &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, &icy; &vcy;&scy;&iecy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ycy; &bcy;&ucy;&dcy;&ucy;&tcy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&icy;&mcy;&icy; &pcy;&ocy;&vcy;&iecy;&rcy;&khcy; &bcy;&ocy;&lcy;&iecy;&iecy; &rcy;&acy;&ncy;&ncy;&icy;&khcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;.</span></p> <p><span data-i18n="b10926bfb8f300f156b8674f2c8093321f166ae53ebfcc3d5f1ee65ef01c644c/46" data-source="Again, normally you&amp;rsquo;d never actually do this by hand. There is a helpful script called &lt;code&gt;git commit&lt;/code&gt; that will do all of this for you. So you could have just written &lt;code&gt;git commit&lt;/code&gt; instead, and it would have done the above magic scripting for you." onmousemove="i18n(this)">&Ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;, &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&iecy;&tcy;&iecy; &ecy;&tcy;&ocy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;. &Scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ycy;&jcy; &scy;&kcy;&rcy;&icy;&pcy;&tcy;  <code>git commit</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &scy;&dcy;&iecy;&lcy;&acy;&iecy;&tcy; &vcy;&scy;&iecy; &ecy;&tcy;&ocy; &zcy;&acy; &vcy;&acy;&scy;. &Tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;, &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &vcy;&ycy; &mcy;&ocy;&gcy;&lcy;&icy; &bcy;&ycy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ncy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy;  <code>git commit</code> , &icy; &ocy;&ncy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&lcy; &bcy;&ycy; &zcy;&acy; &vcy;&acy;&scy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ycy;&jcy; &vcy;&ycy;&shcy;&iecy; &vcy;&ocy;&lcy;&shcy;&iecy;&bcy;&ncy;&ycy;&jcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_making_a_change"><span data-i18n="0c6664f3c6dc92b5455b7748e9ef3b58d72bd3b84b78d4419f1ba4291665212d/17" data-source="Making a change" onmousemove="i18n(this)">&Vcy;&ncy;&iecy;&scy;&iecy;&ncy;&icy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy;</span></h2> <div> <p><span data-i18n="1f48e1fd4673ee34cbf400c6706bdf9dfa2c6dc8fe1ed5e99a88a83db3b030fc/ba" data-source="Remember how we did the &lt;code&gt;git update-index&lt;/code&gt; on file &lt;code&gt;hello&lt;/code&gt; and then we changed &lt;code&gt;hello&lt;/code&gt; afterward, and could compare the new state of &lt;code&gt;hello&lt;/code&gt; with the state we saved in the index file?" onmousemove="i18n(this)">&Pcy;&ocy;&mcy;&ncy;&icy;&tcy;&iecy;, &kcy;&acy;&kcy; &mcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy;  <code>git update-index</code>  &vcy; &fcy;&acy;&jcy;&lcy;&iecy;  <code>hello</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&icy;  <code>hello</code>  &icy; &scy;&mcy;&ocy;&gcy;&lcy;&icy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&tcy;&softcy; &ncy;&ocy;&vcy;&ocy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;  <code>hello</code>  &scy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &mcy;&ycy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&lcy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;?</span></p> <p><span data-i18n="8ab6bcf138ce745f5e183a41977c28751b8a43772786156f42a912007a45c940/e9" data-source="Further, remember how I said that &lt;code&gt;git write-tree&lt;/code&gt; writes the contents of the &lt;strong&gt;index&lt;/strong&gt; file to the tree, and thus what we just committed was in fact the &lt;strong&gt;original&lt;/strong&gt; contents of the file &lt;code&gt;hello&lt;/code&gt;, not the new ones. We did that on purpose, to show the difference between the index state, and the state in the working tree, and how they don&amp;rsquo;t have to match, even when we commit things." onmousemove="i18n(this)">&Dcy;&acy;&lcy;&iecy;&iecy;, &pcy;&ocy;&mcy;&ncy;&icy;&tcy;&iecy;, &kcy;&acy;&kcy; &yacy; &gcy;&ocy;&vcy;&ocy;&rcy;&icy;&lcy;, &chcy;&tcy;&ocy;  <code>git write-tree</code>  &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&iecy;&tcy; &vcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;, &icy; &tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy; &tcy;&ocy;, &chcy;&tcy;&ocy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy;, &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &bcy;&ycy;&lcy;&ocy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&mcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&acy;  <code>hello</code> , &acy; &ncy;&iecy; &ncy;&ocy;&vcy;&ycy;&mcy;. &Mcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &ecy;&tcy;&ocy; &scy;&pcy;&iecy;&tscy;&icy;&acy;&lcy;&softcy;&ncy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy; &mcy;&iecy;&zhcy;&dcy;&ucy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &tcy;&ocy;, &chcy;&tcy;&ocy; &ocy;&ncy;&icy; &ncy;&iecy; &ocy;&bcy;&yacy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&tcy;&softcy;, &dcy;&acy;&zhcy;&iecy; &kcy;&ocy;&gcy;&dcy;&acy; &mcy;&ycy; &chcy;&tcy;&ocy;-&tcy;&ocy; &fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&iecy;&mcy;.</span></p> <p><span data-i18n="9bf6747e624e4b38560a5c4f149566713dfa9993e8721c81322d4337971ca374/24" data-source="As before, if we do &lt;code&gt;git diff-files -p&lt;/code&gt; in our git-tutorial project, we&amp;rsquo;ll still see the same difference we saw last time: the index file hasn&amp;rsquo;t changed by the act of committing anything. However, now that we have committed something, we can also learn to use a new command: &lt;code&gt;git diff-index&lt;/code&gt;." onmousemove="i18n(this)">&Kcy;&acy;&kcy; &icy; &pcy;&rcy;&iecy;&zhcy;&dcy;&iecy;, &iecy;&scy;&lcy;&icy; &mcy;&ycy; &vcy;&ocy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&scy;&yacy;  <code>git diff-files -p</code>  &vcy; &ncy;&acy;&shcy;&iecy;&mcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy; git-tutorial, &mcy;&ycy; &vcy;&scy;&iecy; &rcy;&acy;&vcy;&ncy;&ocy; &ucy;&vcy;&icy;&dcy;&icy;&mcy; &tcy;&ucy; &zhcy;&iecy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy;, &chcy;&tcy;&ocy; &icy; &vcy; &pcy;&rcy;&ocy;&shcy;&lcy;&ycy;&jcy; &rcy;&acy;&zcy;: &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &ncy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&scy;&yacy; &vcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy;&iecy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &chcy;&iecy;&gcy;&ocy;-&lcy;&icy;&bcy;&ocy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy;, &kcy;&ocy;&gcy;&dcy;&acy; &mcy;&ycy; &chcy;&tcy;&ocy;-&tcy;&ocy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy;, &mcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&mcy; &ncy;&acy;&ucy;&chcy;&icy;&tcy;&softcy;&scy;&yacy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:  <code>git diff-index</code> .</span></p> <p><span data-i18n="2367f044d32e46ca99018e918c2136e922997e48ff70807fbabb36a0eb208db0/0f" data-source="Unlike &lt;code&gt;git diff-files&lt;/code&gt;, which showed the difference between the index file and the working tree, &lt;code&gt;git diff-index&lt;/code&gt; shows the differences between a committed &lt;strong&gt;tree&lt;/strong&gt; and either the index file or the working tree. In other words, &lt;code&gt;git diff-index&lt;/code&gt; wants a tree to be diffed against, and before we did the commit, we couldn&amp;rsquo;t do that, because we didn&amp;rsquo;t have anything to diff against." onmousemove="i18n(this)">&Vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy; &ocy;&tcy;  <code>git diff-files</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&lcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy; &mcy;&iecy;&zhcy;&dcy;&ucy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;,  <code>git diff-index</code>  &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&yacy; &mcy;&iecy;&zhcy;&dcy;&ucy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy; &icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy; &icy;&lcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;. &Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;,  <code>git diff-index</code>  &khcy;&ocy;&chcy;&iecy;&tcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&lcy;&ocy;&scy;&softcy;, &ncy;&ocy; &dcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &mcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy;, &mcy;&ycy; &ncy;&iecy; &mcy;&ocy;&gcy;&lcy;&icy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;, &pcy;&ocy;&tcy;&ocy;&mcy;&ucy; &chcy;&tcy;&ocy; &ncy;&acy;&mcy; &ncy;&iecy; &scy; &chcy;&iecy;&mcy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&tcy;&softcy;.</span></p> <p><span data-i18n="b513cb26bb11ef1135396f77fee0c9315fa5ed66a2974e54f1634cb9f62727da/5f" data-source="But now we can do" onmousemove="i18n(this)">&Ncy;&ocy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-perl">$ git diff-<span class="hljs-keyword">index</span> -p HEAD</pre> </div> </div> <p><span data-i18n="8c9fb4954a069f849444a33c613b7c7e1f4afbeef801adb5fa450aa081face7d/3a" data-source="(where &lt;code&gt;-p&lt;/code&gt; has the same meaning as it did in &lt;code&gt;git diff-files&lt;/code&gt;), and it will show us the same difference, but for a totally different reason. Now we&amp;rsquo;re comparing the working tree not against the index file, but against the tree we just wrote. It just so happens that those two are obviously the same, so we get the same result." onmousemove="i18n(this)">(&gcy;&dcy;&iecy;  <code>-p</code>  &icy;&mcy;&iecy;&iecy;&tcy; &tcy;&ocy; &zhcy;&iecy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &icy; &vcy;  <code>git diff-files</code> ), &icy; &ocy;&ncy; &pcy;&ocy;&kcy;&acy;&zhcy;&iecy;&tcy; &ncy;&acy;&mcy; &tcy;&ucy; &zhcy;&iecy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy;, &ncy;&ocy; &pcy;&ocy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&ncy;&ocy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&iecy;. &Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &mcy;&ycy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &ncy;&iecy; &scy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&ocy;&mcy;, &acy; &scy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &ncy;&acy;&pcy;&icy;&scy;&acy;&lcy;&icy;. &Tcy;&acy;&kcy; &ucy;&zhcy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&lcy;&ocy;&scy;&softcy;, &chcy;&tcy;&ocy; &ecy;&tcy;&icy; &dcy;&vcy;&acy;, &ocy;&chcy;&iecy;&vcy;&icy;&dcy;&ncy;&ocy;, &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ycy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &mcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&iecy;&mcy; &ocy;&dcy;&icy;&ncy; &icy; &tcy;&ocy;&tcy; &zhcy;&iecy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;.</span></p> <p><span data-i18n="2b89e6ac6384636b674abb647e420bc99d65a7fd006f426bd9e45747dd97b539/5a" data-source="Again, because this is a common operation, you can also just shorthand it with" onmousemove="i18n(this)">&Ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ecy;&tcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&acy;&yacy; &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yacy;, &vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&ocy;&kcy;&rcy;&acy;&tcy;&icy;&tcy;&softcy; &iecy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git diff <span class="hljs-variable constant_">HEAD</span></pre> </div> </div> <p><span data-i18n="55d46fced2cf43e3f3754c686deb9b1866be8f1ce522b3274b0a205ff60c41de/f5" data-source="which ends up doing the above for you." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&iecy;&tcy; &dcy;&lcy;&yacy; &vcy;&acy;&scy; &vcy;&scy;&iecy; &vcy;&ycy;&shcy;&iecy;&pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy;.</span></p> <p><span data-i18n="414d97dca54974b558bc885afdabd206ad3ffbf4eab2189a28cf2a7ca9af353b/1d" data-source="In other words, &lt;code&gt;git diff-index&lt;/code&gt; normally compares a tree against the working tree, but when given the &lt;code&gt;--cached&lt;/code&gt; flag, it is told to instead compare against just the index cache contents, and ignore the current working tree state entirely. Since we just wrote the index file to HEAD, doing &lt;code&gt;git diff-index --cached -p HEAD&lt;/code&gt; should thus return an empty set of differences, and that&amp;rsquo;s exactly what it does." onmousemove="i18n(this)">&Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;,  <code>git diff-index</code>  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&iecy;&tcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &ncy;&ocy; &kcy;&ocy;&gcy;&dcy;&acy; &iecy;&mcy;&ucy; &zcy;&acy;&dcy;&acy;&ncy; &fcy;&lcy;&acy;&gcy;  <code>--cached</code> , &iecy;&mcy;&ucy; &pcy;&rcy;&iecy;&dcy;&lcy;&acy;&gcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&gcy;&ocy; &kcy;&ecy;&shcy;&acy; &icy; &pcy;&ocy;&lcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&acy;&lcy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &vcy; HEAD, &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy;  <code>git diff-index --cached -p HEAD</code>  &dcy;&ocy;&lcy;&zhcy;&ncy;&ocy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &ncy;&acy;&bcy;&ocy;&rcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&jcy;, &icy; &ecy;&tcy;&ocy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &tcy;&ocy;, &chcy;&tcy;&ocy; &ocy;&ncy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td> <p><span data-i18n="b9f7e4ac5d807a02c6a429ec5840e5448a8b2d3d44224433578594cc28c9a256/bb" data-source="&lt;code&gt;git diff-index&lt;/code&gt; really always uses the index for its comparisons, and saying that it compares a tree against the working tree is thus not strictly accurate. In particular, the list of files to compare (the &amp;quot;meta-data&amp;quot;) &lt;strong&gt;always&lt;/strong&gt; comes from the index file, regardless of whether the &lt;code&gt;--cached&lt;/code&gt; flag is used or not. The &lt;code&gt;--cached&lt;/code&gt; flag really only determines whether the file &lt;strong&gt;contents&lt;/strong&gt; to be compared come from the working tree or not." onmousemove="i18n(this)"><code>git diff-index</code>  &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &dcy;&lcy;&yacy; &scy;&vcy;&ocy;&icy;&khcy; &scy;&rcy;&acy;&vcy;&ncy;&iecy;&ncy;&icy;&jcy;, &icy; &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &ucy;&tcy;&vcy;&iecy;&rcy;&zhcy;&dcy;&iecy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ocy;&ncy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&iecy;&tcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &scy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &ncy;&iecy; &scy;&ocy;&vcy;&scy;&iecy;&mcy; &tcy;&ocy;&chcy;&ncy;&ocy;. &Vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&scy;&tcy;&icy;, &scy;&pcy;&icy;&scy;&ocy;&kcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &dcy;&lcy;&yacy; &scy;&rcy;&acy;&vcy;&ncy;&iecy;&ncy;&icy;&yacy; ( &quot;meta-data&quot; ) &vcy;&scy;&iecy;&gcy;&dcy;&acy; &bcy;&iecy;&rcy;&iecy;&tcy;&scy;&yacy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;, &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &fcy;&lcy;&acy;&gcy;  <code>--cached</code>  &icy;&lcy;&icy; &ncy;&iecy;&tcy;. &Fcy;&lcy;&acy;&gcy;  <code>--cached</code>  &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&yacy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &tcy;&ocy;, &pcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy;&iecy;&tcy; &lcy;&icy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&iecy;&mcy;&ocy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &fcy;&acy;&jcy;&lcy;&acy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy;&lcy;&icy; &ncy;&iecy;&tcy;.</span></p> <p><span data-i18n="a555d1c0e5db32dd0cdfb4e0c36095db9993206143211a53b0d6231d540ef1c1/cc" data-source="This is not hard to understand, as soon as you realize that Git simply never knows (or cares) about files that it is not told about explicitly. Git will never go &lt;strong&gt;looking&lt;/strong&gt; for files to compare, it expects you to tell it what the files are, and that&amp;rsquo;s what the index is there for." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &ncy;&iecy;&tcy;&rcy;&ucy;&dcy;&ncy;&ocy; &pcy;&ocy;&ncy;&yacy;&tcy;&softcy;, &kcy;&acy;&kcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &pcy;&ocy;&jcy;&mcy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy;  Git  &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &zcy;&ncy;&acy;&iecy;&tcy; (&icy;&lcy;&icy; &ncy;&iecy; &zcy;&acy;&bcy;&ocy;&tcy;&icy;&tcy;&scy;&yacy;) &ocy; &fcy;&acy;&jcy;&lcy;&acy;&khcy;, &ocy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &iecy;&mcy;&ucy; &ncy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ocy; &yacy;&vcy;&ncy;&ocy;.  Git  &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&scy;&kcy;&acy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;&ycy; &dcy;&lcy;&yacy; &scy;&rcy;&acy;&vcy;&ncy;&iecy;&ncy;&icy;&yacy;, &ocy;&ncy; &ocy;&zhcy;&icy;&dcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&iecy; &iecy;&mcy;&ucy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &zcy;&acy; &fcy;&acy;&jcy;&lcy;&ycy;, &icy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &icy; &ncy;&ucy;&zhcy;&iecy;&ncy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;.</span></p> </td> </tr> </table></div> </div> <p><span data-i18n="95e1b2f968b2f4118081fcb6306d068b8ebea8ea16d379b347df9b6a6b843c13/2d" data-source="However, our next step is to commit the &lt;strong&gt;change&lt;/strong&gt; we did, and again, to understand what&amp;rsquo;s going on, keep in mind the difference between &amp;quot;working tree contents&amp;quot;, &amp;quot;index file&amp;quot; and &amp;quot;committed tree&amp;quot;. We have changes in the working tree that we want to commit, and we always have to work through the index file, so the first thing we need to do is to update the index cache:" onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &ncy;&acy;&shcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&jcy; &shcy;&acy;&gcy; &mdash; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;&ncy;&iecy;&scy;&iecy;&ncy;&ncy;&ocy;&iecy; &ncy;&acy;&mcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&iecy;, &icy; &ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&ncy;&yacy;&tcy;&softcy;, &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy;, &icy;&mcy;&iecy;&jcy;&tcy;&iecy; &vcy; &vcy;&icy;&dcy;&ucy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy; &mcy;&iecy;&zhcy;&dcy;&ucy;  &quot;working tree contents&quot; ,  &quot;index file&quot;  &icy;  &quot;committed tree&quot; . &Ucy; &ncy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &mcy;&ycy; &khcy;&ocy;&tcy;&icy;&mcy; &zcy;&acy;&kcy;&ocy;&mcy;&mcy;&icy;&tcy;&icy;&tcy;&softcy;, &icy; &ncy;&acy;&mcy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &pcy;&rcy;&icy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &chcy;&iecy;&rcy;&iecy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &pcy;&iecy;&rcy;&vcy;&ocy;&iecy;, &chcy;&tcy;&ocy; &ncy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;, &ecy;&tcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &kcy;&iecy;&shcy;:</span></p> <div> <div> <pre class="hljs language-perl">$ git update-<span class="hljs-keyword">index</span> hello</pre> </div> </div> <p><span data-i18n="b8eb03a6408377cbadaadca5b478ebb21d46f1ca5811949d90cb0f7ebb711c52/df" data-source="(note how we didn&amp;rsquo;t need the &lt;code&gt;--add&lt;/code&gt; flag this time, since Git knew about the file already)." onmousemove="i18n(this)">(&ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ncy;&acy; &ecy;&tcy;&ocy;&tcy; &rcy;&acy;&zcy; &ncy;&acy;&mcy; &ncy;&iecy; &ncy;&ucy;&zhcy;&iecy;&ncy; &bcy;&ycy;&lcy; &fcy;&lcy;&acy;&gcy;  <code>--add</code> , &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy;  Git  &ucy;&zhcy;&iecy; &zcy;&ncy;&acy;&lcy; &ocy;&bcy; &ecy;&tcy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy;).</span></p> <p><span data-i18n="b53455b391d1678467a197801ee9bfa3e16e6d79cb7678d221c2989d6a5fb015/cd" data-source="Note what happens to the different &lt;code&gt;git diff-*&lt;/code&gt; versions here. After we&amp;rsquo;ve updated &lt;code&gt;hello&lt;/code&gt; in the index, &lt;code&gt;git diff-files -p&lt;/code&gt; now shows no differences, but &lt;code&gt;git diff-index -p HEAD&lt;/code&gt; still &lt;strong&gt;does&lt;/strong&gt; show that the current state is different from the state we committed. In fact, now &lt;code&gt;git diff-index&lt;/code&gt; shows the same difference whether we use the &lt;code&gt;--cached&lt;/code&gt; flag or not, since now the index is coherent with the working tree." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &zcy;&dcy;&iecy;&scy;&softcy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy; &scy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&mcy;&icy; &vcy;&iecy;&rcy;&scy;&icy;&yacy;&mcy;&icy;  <code>git diff-*</code> . &Pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &mcy;&ycy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&lcy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;  <code>hello</code> ,  <code>git diff-files -p</code>  &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &ncy;&iecy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&icy;&kcy;&acy;&kcy;&icy;&khcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&jcy;, &ncy;&ocy;  <code>git diff-index -p HEAD</code>  &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&tcy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &ncy;&acy;&mcy;&icy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy;. &Fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy;  <code>git diff-index</code>  &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &tcy;&ucy; &zhcy;&iecy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy; &lcy;&icy; &mcy;&ycy; &fcy;&lcy;&acy;&gcy;  <code>--cached</code>  &icy;&lcy;&icy; &ncy;&iecy;&tcy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &scy;&ocy;&gcy;&lcy;&acy;&scy;&ocy;&vcy;&acy;&ncy; &scy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;.</span></p> <p><span data-i18n="6f1db7b77087ba190dea4565c186f701f6ba64c310b0257030478ec7a07958e3/82" data-source="Now, since we&amp;rsquo;ve updated &lt;code&gt;hello&lt;/code&gt; in the index, we can commit the new version. We could do it by writing the tree by hand again, and committing the tree (this time we&amp;rsquo;d have to use the &lt;code&gt;-p HEAD&lt;/code&gt; flag to tell commit that the HEAD was the &lt;strong&gt;parent&lt;/strong&gt; of the new commit, and that this wasn&amp;rsquo;t an initial commit any more), but you&amp;rsquo;ve done that once already, so let&amp;rsquo;s just use the helpful script this time:" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &mcy;&ycy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&lcy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;  <code>hello</code> , &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&rcy;&scy;&icy;&yucy;. &Mcy;&ycy; &mcy;&ocy;&gcy;&lcy;&icy; &bcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;, &scy;&ncy;&ocy;&vcy;&acy; &ncy;&acy;&pcy;&icy;&scy;&acy;&vcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy; &icy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&vcy; &iecy;&gcy;&ocy; (&ncy;&acy; &ecy;&tcy;&ocy;&tcy; &rcy;&acy;&zcy; &ncy;&acy;&mcy; &pcy;&rcy;&icy;&dcy;&iecy;&tcy;&scy;&yacy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &fcy;&lcy;&acy;&gcy;  <code>-p HEAD</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&softcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ucy;, &chcy;&tcy;&ocy; HEAD &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&iecy;&mcy; &ncy;&ocy;&vcy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &icy; &chcy;&tcy;&ocy; &ecy;&tcy;&ocy; &ncy;&iecy; &ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;). &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy;), &ncy;&ocy; &vcy;&ycy; &ucy;&zhcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &ecy;&tcy;&ocy; &ocy;&dcy;&ncy;&acy;&zhcy;&dcy;&ycy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &ncy;&acy; &ecy;&tcy;&ocy;&tcy; &rcy;&acy;&zcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&ocy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&scy;&yacy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ycy;&mcy; &scy;&kcy;&rcy;&icy;&pcy;&tcy;&ocy;&mcy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git commit</pre> </div> </div> <p><span data-i18n="17d59cb307fd57f2b0d3399e07807e2882884124c3b121fbd66ccb331304ed14/99" data-source="which starts an editor for you to write the commit message and tells you a bit about what you have done." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy; &rcy;&iecy;&dcy;&acy;&kcy;&tcy;&ocy;&rcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &icy; &ncy;&iecy;&mcy;&ncy;&ocy;&gcy;&ocy; &rcy;&acy;&scy;&scy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &vcy;&acy;&mcy; &ocy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;.</span></p> <p><span data-i18n="a37eeda8a3ed3a5132abe6d8008ed3aeca08f06b2aca2a700452c613be62ae80/2c" data-source="Write whatever message you want, and all the lines that start with &lt;code&gt;#&lt;/code&gt; will be pruned out, and the rest will be used as the commit message for the change. If you decide you don&amp;rsquo;t want to commit anything after all at this point (you can continue to edit things and update the index), you can just leave an empty message. Otherwise &lt;code&gt;git commit&lt;/code&gt; will commit the change for you." onmousemove="i18n(this)">&Ncy;&acy;&pcy;&icy;&shcy;&icy;&tcy;&iecy; &lcy;&yucy;&bcy;&ocy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy;, &icy; &vcy;&scy;&iecy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;, &ncy;&acy;&chcy;&icy;&ncy;&acy;&yucy;&shchcy;&icy;&iecy;&scy;&yacy; &scy;  <code>#</code> , &bcy;&ucy;&dcy;&ucy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ycy;, &acy; &ocy;&scy;&tcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &kcy;&acy;&kcy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;. &IEcy;&scy;&lcy;&icy; &vcy;&ycy; &rcy;&iecy;&shcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy; &vcy;&ycy; &vcy;&ocy;&ocy;&bcy;&shchcy;&iecy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; (&vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&tcy;&softcy; &rcy;&iecy;&dcy;&acy;&kcy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &chcy;&tcy;&ocy;-&tcy;&ocy; &icy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&tcy;&softcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;), &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&scy;&tcy;&acy;&vcy;&icy;&tcy;&softcy; &pcy;&ucy;&scy;&tcy;&ocy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy;. &Vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;  <code>git commit</code>  &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&iecy;&tcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&iecy; &zcy;&acy; &vcy;&acy;&scy;.</span></p> <p><span data-i18n="11ace4411a6d164fd900d3a722037d329c2be43e158ce8d614d36951812098e5/ec" data-source="You&amp;rsquo;ve now made your first real Git commit. And if you&amp;rsquo;re interested in looking at what &lt;code&gt;git commit&lt;/code&gt; really does, feel free to investigate: it&amp;rsquo;s a few very simple shell scripts to generate the helpful (?) commit message headers, and a few one-liners that actually do the commit itself (&lt;code&gt;git commit&lt;/code&gt;)." onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &scy;&vcy;&ocy;&jcy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  Git . &Icy; &iecy;&scy;&lcy;&icy; &vcy;&acy;&mcy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&ocy; &pcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&iecy;&tcy;&softcy;, &chcy;&tcy;&ocy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;  <code>git commit</code> , &ncy;&iecy; &scy;&tcy;&iecy;&scy;&ncy;&yacy;&jcy;&tcy;&iecy;&scy;&softcy; &icy;&scy;&scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&tcy;&softcy;: &ecy;&tcy;&ocy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&chcy;&iecy;&ncy;&softcy; &pcy;&rcy;&ocy;&scy;&tcy;&ycy;&khcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&iecy;&vcy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy; &dcy;&lcy;&yacy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ycy;&khcy; (?) &zcy;&acy;&gcy;&ocy;&lcy;&ocy;&vcy;&kcy;&ocy;&vcy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&jcy; &ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &icy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&ncy;&ocy;&scy;&tcy;&rcy;&ocy;&chcy;&ncy;&ycy;&khcy; &scy;&tcy;&rcy;&ocy;&kcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&yucy;&tcy; &scy;&acy;&mcy;&ucy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy; (  <code>git commit</code> ).</span></p> </div> <h2 class="text-body-emphasis"  id="_inspecting_changes"><span data-i18n="927aec0c8fcf94017e54a0632a703c4a21d26091ff5479709ecf91ac468ad3af/82" data-source="Inspecting changes" onmousemove="i18n(this)">Inspecting changes</span></h2> <div> <p><span data-i18n="1d71fe369407ff498538fccb80cffc2666fb30cfdf919fc396a53a8acbfa12da/e6" data-source="While creating changes is useful, it&amp;rsquo;s even more useful if you can tell later what changed. The most useful command for this is another of the &lt;code&gt;diff&lt;/code&gt; family, namely &lt;code&gt;git diff-tree&lt;/code&gt;." onmousemove="i18n(this)">&Vcy;&ncy;&ocy;&scy;&icy;&tcy;&softcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy;, &ncy;&ocy; &iecy;&shchcy;&iecy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&iecy;&iecy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &scy;&mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&ocy;&zcy;&zhcy;&iecy; &scy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&ocy;&scy;&softcy;. &Scy;&acy;&mcy;&acy;&yacy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&acy;&yacy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &mdash; &dcy;&rcy;&ucy;&gcy;&acy;&yacy; &icy;&zcy; &scy;&iecy;&mcy;&iecy;&jcy;&scy;&tcy;&vcy;&acy;  <code>diff</code> , &acy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy;  <code>git diff-tree</code> .</span></p> <p><span data-i18n="ecfd8b667663ffbd2428887282d8f2b156e09f1e8fec367e1e6d6ab47184a9ef/f1" data-source="&lt;code&gt;git diff-tree&lt;/code&gt; can be given two arbitrary trees, and it will tell you the differences between them. Perhaps even more commonly, though, you can give it just a single commit object, and it will figure out the parent of that commit itself, and show the difference directly. Thus, to get the same diff that we&amp;rsquo;ve already seen several times, we can now do" onmousemove="i18n(this)"><code>git diff-tree</code>  &mcy;&ocy;&zhcy;&ncy;&ocy; &zcy;&acy;&dcy;&acy;&tcy;&softcy; &dcy;&vcy;&acy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&lcy;&softcy;&ncy;&ycy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &icy; &ocy;&ncy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy; &vcy;&acy;&mcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&yacy; &mcy;&iecy;&zhcy;&dcy;&ucy; &ncy;&icy;&mcy;&icy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy;, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &dcy;&acy;&zhcy;&iecy; &chcy;&acy;&shchcy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&tcy;&softcy; &iecy;&mcy;&ucy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&icy;&ncy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &icy; &ocy;&ncy; &scy;&acy;&mcy; &vcy;&ycy;&chcy;&icy;&scy;&lcy;&icy;&tcy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy; &icy; &ncy;&acy;&pcy;&rcy;&yacy;&mcy;&ucy;&yucy; &pcy;&ocy;&kcy;&acy;&zhcy;&iecy;&tcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy;. &Tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &tcy;&ocy;&tcy; &zhcy;&iecy; &dcy;&icy;&fcy;&fcy;&iecy;&rcy;&iecy;&ncy;&tscy;&icy;&acy;&lcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &mcy;&ycy; &ucy;&zhcy;&iecy; &vcy;&icy;&dcy;&iecy;&lcy;&icy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&acy;&zcy;, &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git diff-tree -p <span class="hljs-variable constant_">HEAD</span></pre> </div> </div> <p><span data-i18n="0c4ae66db31cb33b2f5dbbbd0eb7f5fd2bcd363b2a4ddef66f26945c0e2be9c1/26" data-source="(again, &lt;code&gt;-p&lt;/code&gt; means to show the difference as a human-readable patch), and it will show what the last commit (in &lt;code&gt;HEAD&lt;/code&gt;) actually changed." onmousemove="i18n(this)">(&ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;,  <code>-p</code>  &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&ucy; &vcy; &vcy;&icy;&dcy;&iecy; &ucy;&dcy;&ocy;&bcy;&ocy;&chcy;&icy;&tcy;&acy;&iecy;&mcy;&ocy;&gcy;&ocy; &pcy;&acy;&tcy;&chcy;&acy;), &icy; &ocy;&ncy; &pcy;&ocy;&kcy;&acy;&zhcy;&iecy;&tcy;, &chcy;&tcy;&ocy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; (&vcy;  <code>HEAD</code> ).</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td> <p><span data-i18n="9af0b7ec6d831307e8401ec7ef354d724b41192f5679551157534cf41530dcfd/09" data-source="Here is an ASCII art by Jon Loeliger that illustrates how various &lt;code&gt;diff-*&lt;/code&gt; commands compare things." onmousemove="i18n(this)">&Vcy;&ocy;&tcy; ASCII-&icy;&zcy;&ocy;&bcy;&rcy;&acy;&zhcy;&iecy;&ncy;&icy;&iecy; &Dcy;&zhcy;&ocy;&ncy;&acy; &Lcy;&iecy;&lcy;&icy;&gcy;&iecy;&rcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &icy;&lcy;&lcy;&yucy;&scy;&tcy;&rcy;&icy;&rcy;&ucy;&iecy;&tcy;, &kcy;&acy;&kcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>diff-*</code>  &scy;&rcy;&acy;&vcy;&ncy;&icy;&vcy;&acy;&yucy;&tcy; &vcy;&iecy;&shchcy;&icy;.</span></p> <div> <div> <pre class="hljs language-lua">            diff-tree
             +<span class="hljs-comment">----+</span>
             |    |
             |    |
             V    V
          +<span class="hljs-comment">-----------+</span>
          | Object DB |
          |  Backing  |
          |   Store   |
          +<span class="hljs-comment">-----------+</span>
            ^    ^
            |    |
            |    |  diff-index <span class="hljs-comment">--cached</span>
            |    |
diff-index  |    V
            |  +<span class="hljs-comment">-----------+</span>
            |  |   Index   |
            |  |  <span class="hljs-string">&quot;cache&quot;</span>  |
            |  +<span class="hljs-comment">-----------+</span>
            |    ^
            |    |
            |    |  diff-files
            |    |
            V    V
          +<span class="hljs-comment">-----------+</span>
          |  Working  |
          | Directory |
          +<span class="hljs-comment">-----------+</span></pre> </div> </div> </td> </tr> </table></div> </div> <p><span data-i18n="bf00423cfa73ddc96cebced4a5b00a2fb66e5c0386197d39fee56a2c9806fd55/0f" data-source="More interestingly, you can also give &lt;code&gt;git diff-tree&lt;/code&gt; the &lt;code&gt;--pretty&lt;/code&gt; flag, which tells it to also show the commit message and author and date of the commit, and you can tell it to show a whole series of diffs. Alternatively, you can tell it to be &amp;quot;silent&amp;quot;, and not show the diffs at all, but just show the actual commit message." onmousemove="i18n(this)">&CHcy;&tcy;&ocy; &iecy;&shchcy;&iecy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&iecy;&iecy;, &vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&zcy;&ncy;&acy;&chcy;&icy;&tcy;&softcy;  <code>git diff-tree</code>  &fcy;&lcy;&acy;&gcy;  <code>--pretty</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&rcy;&iecy;&dcy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&iecy;&tcy; &iecy;&mcy;&ucy; &tcy;&acy;&kcy;&zhcy;&iecy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&tcy;&softcy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&iecy;, &acy;&vcy;&tcy;&ocy;&rcy;&acy; &icy; &dcy;&acy;&tcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy;, &icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &iecy;&mcy;&ucy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &tscy;&iecy;&lcy;&ucy;&yucy; &scy;&iecy;&rcy;&icy;&yucy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&jcy;. &Vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&lcy;&softcy;&tcy;&iecy;&rcy;&ncy;&acy;&tcy;&icy;&vcy;&ycy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy;  &quot;silent&quot; , &icy; &vcy;&ocy;&ocy;&bcy;&shchcy;&iecy; &ncy;&iecy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&yacy;, &acy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;.</span></p> <p><span data-i18n="e5afa161e68a9f7b25805adfc9f009770c05b92a4854b1a6f2e4b3ac0ad2e468/af" data-source="In fact, together with the &lt;code&gt;git rev-list&lt;/code&gt; program (which generates a list of revisions), &lt;code&gt;git diff-tree&lt;/code&gt; ends up being a veritable fount of changes. You can emulate &lt;code&gt;git log&lt;/code&gt;, &lt;code&gt;git log -p&lt;/code&gt;, etc. with a trivial script that pipes the output of &lt;code&gt;git rev-list&lt;/code&gt; to &lt;code&gt;git diff-tree --stdin&lt;/code&gt;, which was exactly how early versions of &lt;code&gt;git log&lt;/code&gt; were implemented." onmousemove="i18n(this)">&Fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;, &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &scy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&ocy;&jcy;  <code>git rev-list</code>  (&gcy;&iecy;&ncy;&iecy;&rcy;&icy;&rcy;&ucy;&yucy;&shchcy;&iecy;&jcy; &scy;&pcy;&icy;&scy;&ocy;&kcy; &rcy;&iecy;&vcy;&icy;&zcy;&icy;&jcy;),  <code>git diff-tree</code>  &ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&icy;&mcy; &kcy;&lcy;&acy;&dcy;&iecy;&zcy;&iecy;&mcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ecy;&mcy;&ucy;&lcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git log</code>  ,  <code>git log -p</code>  &icy; &tcy;. &dcy;. &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&iecy;&tcy; &vcy;&ycy;&khcy;&ocy;&dcy;&ncy;&ycy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy;  <code>git rev-list</code>  &vcy;  <code>git diff-tree --stdin</code>  , &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &tcy;&acy;&kcy; &bcy;&ycy;&lcy;&icy; &rcy;&iecy;&acy;&lcy;&icy;&zcy;&ocy;&vcy;&acy;&ncy;&ycy; &rcy;&acy;&ncy;&ncy;&icy;&iecy; &vcy;&iecy;&rcy;&scy;&icy;&icy;  <code>git log</code> .</span></p> </div> <h2 class="text-body-emphasis"  id="_tagging_a_version"><span data-i18n="c2acf772c88c33617ba7a6ebb871241b1331c0c917fb6c5a8fa83c56985d6ea1/00" data-source="Tagging a version" onmousemove="i18n(this)">&Mcy;&acy;&rcy;&kcy;&icy;&rcy;&ocy;&vcy;&kcy;&acy; &vcy;&iecy;&rcy;&scy;&icy;&icy;</span></h2> <div> <p><span data-i18n="2fe33af87221da815eae6200574ab2ef4b85df8c5cc55d8697d0d0ea68070c8b/fd" data-source="In Git, there are two kinds of tags, a &amp;quot;light&amp;quot; one, and an &amp;quot;annotated tag&amp;quot;." onmousemove="i18n(this)">&Vcy; Git &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &dcy;&vcy;&acy; &tcy;&icy;&pcy;&acy; &tcy;&iecy;&gcy;&ocy;&vcy;:  &quot;light&quot;  &icy;  &quot;annotated tag&quot; .</span></p> <p><span data-i18n="c5420726ec272255118f7086d11a76b39d0e7d197faff633c4e8c16e2e58b1ce/2e" data-source="A &amp;quot;light&amp;quot; tag is technically nothing more than a branch, except we put it in the &lt;code&gt;.git/refs/tags/&lt;/code&gt; subdirectory instead of calling it a &lt;code&gt;head&lt;/code&gt;. So the simplest form of tag involves nothing more than" onmousemove="i18n(this)">&Tcy;&iecy;&gcy;  &quot;light&quot;  &tcy;&iecy;&khcy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ncy;&iecy; &chcy;&iecy;&mcy; &icy;&ncy;&ycy;&mcy;, &kcy;&acy;&kcy; &vcy;&iecy;&tcy;&vcy;&softcy;&yucy;, &zcy;&acy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&iecy;&mcy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &mcy;&ycy; &pcy;&ocy;&mcy;&iecy;&shchcy;&acy;&iecy;&mcy; &iecy;&gcy;&ocy; &vcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>.git/refs/tags/</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy;  <code>head</code> . &Tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;, &pcy;&rcy;&ocy;&scy;&tcy;&iecy;&jcy;&shcy;&acy;&yacy; &fcy;&ocy;&rcy;&mcy;&acy; &tcy;&iecy;&gcy;&acy; &vcy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy; &vcy; &scy;&iecy;&bcy;&yacy; &ncy;&iecy; &chcy;&tcy;&ocy; &icy;&ncy;&ocy;&iecy;, &kcy;&acy;&kcy;</span></p> <div> <div> <pre class="hljs language-perl">$ git tag <span class="hljs-keyword">my</span>-first-tag</pre> </div> </div> <p><span data-i18n="62d82416f06f791e280d1cbe4ce6c7a9619905bbce352ff25c32a5822102ed63/46" data-source="which just writes the current &lt;code&gt;HEAD&lt;/code&gt; into the &lt;code&gt;.git/refs/tags/my-first-tag&lt;/code&gt; file, after which point you can then use this symbolic name for that particular state. You can, for example, do" onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&iecy;&tcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy;  <code>HEAD</code>  &vcy; &fcy;&acy;&jcy;&lcy;  <code>.git/refs/tags/my-first-tag</code> , &pcy;&ocy;&scy;&lcy;&iecy; &chcy;&iecy;&gcy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&iecy; &icy;&mcy;&yacy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &kcy;&ocy;&ncy;&kcy;&rcy;&iecy;&tcy;&ncy;&ocy;&gcy;&ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-perl">$ git diff <span class="hljs-keyword">my</span>-first-tag</pre> </div> </div> <p><span data-i18n="51ba9b88003600bd91c40dc4cfcfd88d93236b1ce42c4cd77296dab1e50e41e4/97" data-source="to diff your current state against that tag which at this point will obviously be an empty diff, but if you continue to develop and commit stuff, you can use your tag as an &amp;quot;anchor-point&amp;quot; to see what has changed since you tagged it." onmousemove="i18n(this)">&chcy;&tcy;&ocy;&bcy;&ycy; &scy;&rcy;&acy;&vcy;&ncy;&icy;&tcy;&softcy; &vcy;&acy;&shcy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&iecy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &scy; &ecy;&tcy;&icy;&mcy; &tcy;&iecy;&gcy;&ocy;&mcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;, &ocy;&chcy;&iecy;&vcy;&icy;&dcy;&ncy;&ocy;, &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&ucy;&scy;&tcy;&ycy;&mcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&iecy;&mcy;, &ncy;&ocy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&icy;&tcy;&iecy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&tcy;&softcy; &icy; &fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &chcy;&tcy;&ocy;-&tcy;&ocy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&vcy;&ocy;&jcy; &tcy;&iecy;&gcy; &kcy;&acy;&kcy;  &quot;anchor-point&quot; , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &chcy;&tcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&ocy;&scy;&softcy; &scy; &tcy;&iecy;&khcy; &pcy;&ocy;&rcy;, &kcy;&acy;&kcy; &vcy;&ycy; &iecy;&gcy;&ocy; &pcy;&ocy;&mcy;&iecy;&tcy;&icy;&lcy;&icy;.</span></p> <p><span data-i18n="e8b03389ca25387a4f5f379c8c7e4ba378985c37fe6304fc8148c3682b27d9fd/02" data-source="An &amp;quot;annotated tag&amp;quot; is actually a real Git object, and contains not only a pointer to the state you want to tag, but also a small tag name and message, along with optionally a PGP signature that says that yes, you really did that tag. You create these annotated tags with either the &lt;code&gt;-a&lt;/code&gt; or &lt;code&gt;-s&lt;/code&gt; flag to &lt;code&gt;git tag&lt;/code&gt;:" onmousemove="i18n(this)">&quot;annotated tag&quot;  &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ycy;&mcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&mcy;  Git  &icy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &ncy;&iecy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy; &ncy;&acy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &pcy;&ocy;&mcy;&iecy;&tcy;&icy;&tcy;&softcy;, &ncy;&ocy; &tcy;&acy;&kcy;&zhcy;&iecy; &ncy;&iecy;&bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&iecy; &icy;&mcy;&yacy; &icy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &tcy;&iecy;&gcy;&acy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy;, &pcy;&rcy;&icy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy;&scy;&tcy;&icy;, &pcy;&ocy;&dcy;&pcy;&icy;&scy;&softcy; PGP, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &gcy;&ocy;&vcy;&ocy;&rcy;&icy;&tcy;, &chcy;&tcy;&ocy; &dcy;&acy;, &vcy;&ycy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &ecy;&tcy;&ocy;&tcy; &tcy;&iecy;&gcy;. &Vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&iecy; &ecy;&tcy;&icy; &acy;&ncy;&ncy;&ocy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &tcy;&iecy;&gcy;&icy; &scy; &fcy;&lcy;&acy;&gcy;&ocy;&mcy;  <code>-a</code>  &icy;&lcy;&icy;  <code>-s</code>  &dcy;&lcy;&yacy;  <code>git tag</code> :</span></p> <div> <div> <pre class="hljs language-xml">$ git tag -s <span class="hljs-tag">&lt;<span class="hljs-name">tagname</span>&gt;</span></pre> </div> </div> <p><span data-i18n="f436671796193cff6bb8d15ef197cf5fcaf23a0eefb624f16e7ab67846515c28/71" data-source="which will sign the current &lt;code&gt;HEAD&lt;/code&gt; (but you can also give it another argument that specifies the thing to tag, e.g., you could have tagged the current &lt;code&gt;mybranch&lt;/code&gt; point by using &lt;code&gt;git tag &amp;lt;tagname&amp;gt; mybranch&lt;/code&gt;)." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&ocy;&dcy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&ucy;&yucy; &tcy;&ocy;&chcy;&kcy;&ucy;  <code>HEAD</code>  (&ncy;&ocy; &vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&tcy;&softcy; &iecy;&mcy;&ucy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;, &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&shchcy;&icy;&jcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &pcy;&ocy;&mcy;&iecy;&tcy;&icy;&tcy;&softcy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &vcy;&ycy; &mcy;&ocy;&gcy;&lcy;&icy; &bcy;&ycy; &pcy;&ocy;&mcy;&iecy;&tcy;&icy;&tcy;&softcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&ucy;&yucy; &tcy;&ocy;&chcy;&kcy;&ucy;  <code>mybranch</code>  &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git tag &lt;tagname&gt; mybranch</code>  ).</span></p> <p><span data-i18n="44847e030bf0a44cb76a4a3e401b614f5548b662df244dfb84851bfe241171f3/95" data-source="You normally only do signed tags for major releases or things like that, while the light-weight tags are useful for any marking you want to do &amp;mdash; any time you decide that you want to remember a certain point, just create a private tag for it, and you have a nice symbolic name for the state at that point." onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&iecy; &pcy;&ocy;&dcy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ycy;&iecy; &tcy;&iecy;&gcy;&icy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &dcy;&lcy;&yacy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ycy;&khcy; &vcy;&ycy;&pcy;&ucy;&scy;&kcy;&ocy;&vcy; &icy;&lcy;&icy; &tcy;&ocy;&mcy;&ucy; &pcy;&ocy;&dcy;&ocy;&bcy;&ncy;&ocy;&gcy;&ocy;, &vcy; &tcy;&ocy; &vcy;&rcy;&iecy;&mcy;&yacy; &kcy;&acy;&kcy; &ocy;&bcy;&lcy;&iecy;&gcy;&chcy;&iecy;&ncy;&ncy;&ycy;&iecy; &tcy;&iecy;&gcy;&icy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ycy; &dcy;&lcy;&yacy; &lcy;&yucy;&bcy;&ocy;&jcy; &mcy;&acy;&rcy;&kcy;&icy;&rcy;&ocy;&vcy;&kcy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &mdash; &kcy;&acy;&zhcy;&dcy;&ycy;&jcy; &rcy;&acy;&zcy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &rcy;&iecy;&shcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &zcy;&acy;&pcy;&ocy;&mcy;&ncy;&icy;&tcy;&softcy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &dcy;&lcy;&yacy; &ncy;&iecy;&gcy;&ocy; &tcy;&iecy;&gcy;  private . , &icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &kcy;&rcy;&acy;&scy;&icy;&vcy;&ocy;&iecy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&kcy;&ocy;&iecy; &icy;&mcy;&yacy; &dcy;&lcy;&yacy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yacy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_copying_repositories"><span data-i18n="53853eb6f15a512ea06013897db4f6bed1004cd094b20bc839ccb18b49f8464d/d4" data-source="Copying repositories" onmousemove="i18n(this)">Copying repositories</span></h2> <div> <p><span data-i18n="95efdb3b8439f1c83ecc7e20a079ec40de1004f055a24bb8a6e2621d2b54d4f3/59" data-source="Git repositories are normally totally self-sufficient and relocatable. Unlike CVS, for example, there is no separate notion of &amp;quot;repository&amp;quot; and &amp;quot;working tree&amp;quot;. A Git repository normally &lt;strong&gt;is&lt;/strong&gt; the working tree, with the local Git information hidden in the &lt;code&gt;.git&lt;/code&gt; subdirectory. There is nothing else. What you see is what you got." onmousemove="i18n(this)">&Rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;  Git  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &pcy;&ocy;&lcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy; &scy;&acy;&mcy;&ocy;&dcy;&ocy;&scy;&tcy;&acy;&tcy;&ocy;&chcy;&ncy;&ycy; &icy; &mcy;&ocy;&gcy;&ucy;&tcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&tcy;&softcy;&scy;&yacy;. &Vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &ocy;&tcy; CVS, &zcy;&dcy;&iecy;&scy;&softcy; &ncy;&iecy;&tcy; &ocy;&tcy;&dcy;&iecy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ocy;&ncy;&yacy;&tcy;&icy;&yacy;  &quot;repository&quot;  &icy;  &quot;working tree&quot; . &Rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  Git  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;&mcy;, &acy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&acy;&yacy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yacy;  Git  &scy;&kcy;&rcy;&ycy;&tcy;&acy; &vcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>.git</code> . &Bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &ncy;&iecy;&tcy;. &Tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &vcy;&icy;&dcy;&icy;&tcy;&iecy;, &ecy;&tcy;&ocy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&lcy;&icy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="7c65c28ed34983e4221d5103631e10eac4a46647ed36b47ec2046ccb7b479939/ba" data-source="You can tell Git to split the Git internal information from the directory that it tracks, but we&amp;rsquo;ll ignore that for now: it&amp;rsquo;s not how normal projects work, and it&amp;rsquo;s really only meant for special uses. So the mental model of &amp;quot;the Git information is always tied directly to the working tree that it describes&amp;quot; may not be technically 100% accurate, but it&amp;rsquo;s a good model for all normal use." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;  Git  &ocy;&tcy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&yucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy;  Git  &ocy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ocy;&ncy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy;, &ncy;&ocy; &pcy;&ocy;&kcy;&acy; &mcy;&ycy; &pcy;&rcy;&ocy;&icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&iecy;&mcy; &ecy;&tcy;&ocy;: &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&iecy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&ycy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&yucy;&tcy; &ncy;&iecy; &tcy;&acy;&kcy;, &icy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &ocy;&ncy;&icy; &pcy;&rcy;&iecy;&dcy;&ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &dcy;&lcy;&yacy; &scy;&pcy;&iecy;&tscy;&icy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;. &Tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;, &mcy;&ycy;&scy;&lcy;&iecy;&ncy;&ncy;&acy;&yacy; &mcy;&ocy;&dcy;&iecy;&lcy;&softcy;  &quot;the Git information is always tied directly to the working tree that it describes&quot; , &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &ncy;&iecy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &tcy;&iecy;&khcy;&ncy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &ncy;&acy; 100% &tcy;&ocy;&chcy;&ncy;&ocy;&jcy;, &ncy;&ocy; &ecy;&tcy;&ocy; &khcy;&ocy;&rcy;&ocy;&shcy;&acy;&yacy; &mcy;&ocy;&dcy;&iecy;&lcy;&softcy; &dcy;&lcy;&yacy; &lcy;&yucy;&bcy;&ocy;&gcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&gcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="62cbd1a983272f9167c493b4f0f535f96021bfb3b857ad66b7b40ac0ff189d20/ca" data-source="This has two implications:" onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &icy;&mcy;&iecy;&iecy;&tcy; &dcy;&vcy;&acy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy;:</span></p> <div> <ul> <li> <p><span data-i18n="0f574a0adb37da98a753c7cfd4f61b9248dc8dab3abad91c35c537430493525c/c4" data-source="if you grow bored with the tutorial repository you created (or you&amp;rsquo;ve made a mistake and want to start all over), you can just do simple" onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &vcy;&acy;&mcy; &ncy;&acy;&scy;&kcy;&ucy;&chcy;&icy;&lcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ycy;&jcy; &vcy;&acy;&mcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &ucy;&chcy;&iecy;&bcy;&ncy;&ycy;&khcy; &pcy;&ocy;&scy;&ocy;&bcy;&icy;&jcy; (&icy;&lcy;&icy; &vcy;&ycy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&lcy;&icy; &ocy;&shcy;&icy;&bcy;&kcy;&ucy; &icy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ncy;&acy;&chcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy;), &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">rm</span> -rf git-tutorial</span></pre> </div> </div> <p><span data-i18n="45017fcbfb4042878915609f1c6ad2dd1992d2bc99d28196f7e0d9fdba2df6f8/07" data-source="and it will be gone. There&amp;rsquo;s no external repository, and there&amp;rsquo;s no history outside the project you created." onmousemove="i18n(this)">&icy; &ocy;&ncy;&ocy; &icy;&scy;&chcy;&iecy;&zcy;&ncy;&iecy;&tcy;. &Ncy;&icy;&kcy;&acy;&kcy;&ocy;&gcy;&ocy; &vcy;&ncy;&iecy;&shcy;&ncy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &icy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy; &zcy;&acy; &pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&acy;&mcy;&icy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ocy;&gcy;&ocy; &vcy;&acy;&mcy;&icy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &ncy;&iecy;&tcy;.</span></p> </li> <li> <p><span data-i18n="42399b3f1e3231ab45af3bff5eb16b6676776a61bce805c69691acf5ab44bb20/c7" data-source="if you want to move or duplicate a Git repository, you can do so. There is &lt;code&gt;git clone&lt;/code&gt; command, but if all you want to do is just to create a copy of your repository (with all the full history that went along with it), you can do so with a regular &lt;code&gt;cp -a git-tutorial new-git-tutorial&lt;/code&gt;." onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&softcy; &icy;&lcy;&icy; &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  Git , &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ecy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;. &Scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git clone</code> , &ncy;&ocy; &iecy;&scy;&lcy;&icy; &vcy;&scy;&iecy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy;, &mdash; &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &kcy;&ocy;&pcy;&icy;&yucy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; (&scy;&ocy; &vcy;&scy;&iecy;&jcy; &scy;&ocy;&pcy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&iecy;&jcy; &iecy;&jcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&iecy;&jcy;), &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&gcy;&ocy;  <code>cp -a git-tutorial new-git-tutorial</code> .</span></p> <p><span data-i18n="78fb5d186a9cf69cd70d44229760d990a17bf5c7717342b4032078080167710d/dd" data-source="Note that when you&amp;rsquo;ve moved or copied a Git repository, your Git index file (which caches various information, notably some of the &amp;quot;stat&amp;quot; information for the files involved) will likely need to be refreshed. So after you do a &lt;code&gt;cp -a&lt;/code&gt; to create a new copy, you&amp;rsquo;ll want to do" onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;: &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&lcy;&icy; &icy;&lcy;&icy; &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  Git , &vcy;&acy;&shcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;  Git  (&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &kcy;&ecy;&shcy;&icy;&rcy;&ucy;&iecy;&tcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy;, &vcy; &chcy;&acy;&scy;&tcy;&ncy;&ocy;&scy;&tcy;&icy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy;  &quot;stat&quot;  &dcy;&lcy;&yacy; &zcy;&acy;&dcy;&iecy;&jcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;), &vcy;&iecy;&rcy;&ocy;&yacy;&tcy;&ncy;&ocy;, &pcy;&ocy;&tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;&scy;&yacy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy;. &Icy;&tcy;&acy;&kcy;, &pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&dcy;&icy;&tcy;&iecy; &ncy;&ocy;&vcy;&ucy;&yucy; &kcy;&ocy;&pcy;&icy;&yucy;  <code>cp -a</code> , &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">update</span><span class="hljs-operator">-</span>index <span class="hljs-comment">--refresh</span></pre> </div> </div> <p><span data-i18n="cf7b7d48789d701538857e531bc43ffafb9383fc515c4a04f49045245967a043/b1" data-source="in the new repository to make sure that the index file is up to date." onmousemove="i18n(this)">&vcy; &ncy;&ocy;&vcy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&bcy;&iecy;&dcy;&icy;&tcy;&softcy;&scy;&yacy;, &chcy;&tcy;&ocy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;.</span></p> </li> </ul> </div> <p><span data-i18n="f93cb97cc087fc290b465d4b83c877c69fa887e1de4153cc6f4f9d3da23640eb/0d" data-source="Note that the second point is true even across machines. You can duplicate a remote Git repository with &lt;strong&gt;any&lt;/strong&gt; regular copy mechanism, be it &lt;code&gt;scp&lt;/code&gt;, &lt;code&gt;rsync&lt;/code&gt; or &lt;code&gt;wget&lt;/code&gt;." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &vcy;&tcy;&ocy;&rcy;&ocy;&jcy; &pcy;&ucy;&ncy;&kcy;&tcy; &mdash;  true  &dcy;&acy;&zhcy;&iecy; &ncy;&acy; &rcy;&acy;&zcy;&ncy;&ycy;&khcy; &mcy;&acy;&shcy;&icy;&ncy;&acy;&khcy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &dcy;&ucy;&bcy;&lcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  Git  &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &lcy;&yucy;&bcy;&ocy;&gcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&gcy;&ocy; &mcy;&iecy;&khcy;&acy;&ncy;&icy;&zcy;&mcy;&acy; &kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;, &bcy;&ucy;&dcy;&softcy; &tcy;&ocy;  <code>scp</code> ,  <code>rsync</code>  &icy;&lcy;&icy;  <code>wget</code> .</span></p> <p><span data-i18n="c0b779c582317f42ba6a1f6a45c673109d1424d104e98f6c80ca799f01087cc0/ba" data-source="When copying a remote repository, you&amp;rsquo;ll want to at a minimum update the index cache when you do this, and especially with other peoples&amp;apos; repositories you often want to make sure that the index cache is in some known state (you don&amp;rsquo;t know &lt;strong&gt;what&lt;/strong&gt; they&amp;rsquo;ve done and not yet checked in), so usually you&amp;rsquo;ll precede the &lt;code&gt;git update-index&lt;/code&gt; with a" onmousemove="i18n(this)">&Pcy;&rcy;&icy; &kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &kcy;&acy;&kcy; &mcy;&icy;&ncy;&icy;&mcy;&ucy;&mcy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &kcy;&iecy;&shcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &ecy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;&iecy;, &icy; &ocy;&scy;&ocy;&bcy;&iecy;&ncy;&ncy;&ocy; &vcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &scy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;&mcy;&icy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &lcy;&yucy;&dcy;&iecy;&jcy; &vcy;&ycy; &chcy;&acy;&scy;&tcy;&ocy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ucy;&bcy;&iecy;&dcy;&icy;&tcy;&softcy;&scy;&yacy;, &chcy;&tcy;&ocy; &kcy;&iecy;&shcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &vcy; &kcy;&acy;&kcy;&ocy;&mcy;-&tcy;&ocy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; (&vcy;&ycy; &ncy;&iecy; &zcy;&ncy;&acy;&yucy;&tcy;, &chcy;&tcy;&ocy; &ocy;&ncy;&icy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &icy; &iecy;&shchcy;&iecy; &ncy;&iecy; &zcy;&acy;&rcy;&iecy;&gcy;&icy;&scy;&tcy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy;&scy;&softcy;), &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&dcy;  <code>git update-index</code>  &scy;&tcy;&acy;&vcy;&icy;&tcy;&scy;&yacy;</span></p> <div> <div> <pre class="hljs language-lua">$ git <span class="hljs-built_in">read</span>-tree <span class="hljs-comment">--reset HEAD</span>
$ git update-index <span class="hljs-comment">--refresh</span></pre> </div> </div> <p><span data-i18n="cfd8529850e51616d6986aa387badfd387ed33e28cb7c4d9c9bdf45464c70696/cc" data-source="which will force a total index re-build from the tree pointed to by &lt;code&gt;HEAD&lt;/code&gt;. It resets the index contents to &lt;code&gt;HEAD&lt;/code&gt;, and then the &lt;code&gt;git update-index&lt;/code&gt; makes sure to match up all index entries with the checked-out files. If the original repository had uncommitted changes in its working tree, &lt;code&gt;git update-index --refresh&lt;/code&gt; notices them and tells you they need to be updated." onmousemove="i18n(this)">&chcy;&tcy;&ocy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&tcy; &kcy; &pcy;&iecy;&rcy;&iecy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy;&icy;&yucy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy;&zcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;  <code>HEAD</code>  . &Ocy;&ncy; &scy;&bcy;&rcy;&acy;&scy;&ycy;&vcy;&acy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &ncy;&acy;  <code>HEAD</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy;  <code>git update-index</code>  &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&yacy;&iecy;&tcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&icy;&iecy; &vcy;&scy;&iecy;&khcy; &zcy;&acy;&pcy;&icy;&scy;&iecy;&jcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ycy;&mcy; &fcy;&acy;&jcy;&lcy;&acy;&mcy;. &IEcy;&scy;&lcy;&icy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &bcy;&ycy;&lcy;&icy; &ncy;&iecy;&zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;,  <code>git update-index --refresh</code>  &zcy;&acy;&mcy;&iecy;&tcy;&icy;&tcy; &icy;&khcy; &icy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;, &chcy;&tcy;&ocy; &icy;&khcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy;.</span></p> <p><span data-i18n="1aa98d256a4b1a45cd93598707ee4aa630ede45baaf4fa19505e49d31d8679c8/72" data-source="The above can also be written as simply" onmousemove="i18n(this)">&Vcy;&ycy;&shcy;&iecy;&ucy;&pcy;&ocy;&mcy;&yacy;&ncy;&ucy;&tcy;&ocy;&iecy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&ncy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy;</span></p> <div> <div> <pre class="hljs language-perl">$ git <span class="hljs-keyword">reset</span></pre> </div> </div> <p><span data-i18n="68559632881494bfe5914627c8c800d26970667c0a3aca7668d372737250fa3f/04" data-source="and in fact a lot of the common Git command combinations can be scripted with the &lt;code&gt;git xyz&lt;/code&gt; interfaces. You can learn things by just looking at what the various git scripts do. For example, &lt;code&gt;git reset&lt;/code&gt; used to be the above two lines implemented in &lt;code&gt;git reset&lt;/code&gt;, but some things like &lt;code&gt;git status&lt;/code&gt; and &lt;code&gt;git commit&lt;/code&gt; are slightly more complex scripts around the basic Git commands." onmousemove="i18n(this)">&icy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &mcy;&ncy;&ocy;&gcy;&icy;&iecy; &icy;&zcy; &rcy;&acy;&scy;&pcy;&rcy;&ocy;&scy;&tcy;&rcy;&acy;&ncy;&iecy;&ncy;&ncy;&ycy;&khcy; &kcy;&ocy;&mcy;&bcy;&icy;&ncy;&acy;&tscy;&icy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;  Git  &mcy;&ocy;&gcy;&ucy;&tcy; &bcy;&ycy;&tcy;&softcy; &ncy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ycy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &icy;&ncy;&tcy;&iecy;&rcy;&fcy;&iecy;&jcy;&scy;&ocy;&vcy;  <code>git xyz</code> . &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &mcy;&ncy;&ocy;&gcy;&ocy;&mcy;&ucy; &ncy;&acy;&ucy;&chcy;&icy;&tcy;&softcy;&scy;&yacy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&zcy;&gcy;&lcy;&yacy;&ncy;&ucy;&vcy; &ncy;&acy; &tcy;&ocy;, &chcy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&yucy;&tcy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&ncy;&ycy;&iecy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&icy;  git . &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>git reset</code>  &rcy;&acy;&ncy;&softcy;&shcy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&lcy; &scy;&ocy;&bcy;&ocy;&jcy; &dcy;&vcy;&iecy; &vcy;&ycy;&shcy;&iecy;&ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ycy;&iecy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;, &rcy;&iecy;&acy;&lcy;&icy;&zcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &vcy;  <code>git reset</code> , &ncy;&ocy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&iecy;&shchcy;&icy;, &tcy;&acy;&kcy;&icy;&iecy; &kcy;&acy;&kcy;  <code>git status</code>  &icy;  <code>git commit</code> , &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&yucy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &ncy;&iecy;&mcy;&ncy;&ocy;&gcy;&ocy; &bcy;&ocy;&lcy;&iecy;&iecy; &scy;&lcy;&ocy;&zhcy;&ncy;&ycy;&iecy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&icy; &vcy;&ocy;&kcy;&rcy;&ucy;&gcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ycy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;  Git .</span></p> <p><span data-i18n="f666d4149c8b8f6be172ca0551387e6c0bc80a96c9f353a807a4570f0dda077f/bc" data-source="Many (most?) public remote repositories will not contain any of the checked out files or even an index file, and will &lt;strong&gt;only&lt;/strong&gt; contain the actual core Git files. Such a repository usually doesn&amp;rsquo;t even have the &lt;code&gt;.git&lt;/code&gt; subdirectory, but has all the Git files directly in the repository." onmousemove="i18n(this)">&Mcy;&ncy;&ocy;&gcy;&icy;&iecy; (&bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&ocy;?) &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&khcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;  public  &ncy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &ncy;&icy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &icy;&zcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &icy;&lcy;&icy; &dcy;&acy;&zhcy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;, &acy; &bcy;&ucy;&dcy;&ucy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&iecy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;  Git . &Vcy; &tcy;&acy;&kcy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &dcy;&acy;&zhcy;&iecy; &ncy;&iecy;&tcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  <code>.git</code> , &ncy;&ocy; &vcy;&scy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;  Git  &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&tcy;&scy;&yacy; &ncy;&iecy;&pcy;&ocy;&scy;&rcy;&iecy;&dcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> <p><span data-i18n="4313ae4c8eddcb6808c46fb54b31ad7d5adcec702e35ae5516e0ad36074d833b/c3" data-source="To create your own local live copy of such a &amp;quot;raw&amp;quot; Git repository, you&amp;rsquo;d first create your own subdirectory for the project, and then copy the raw repository contents into the &lt;code&gt;.git&lt;/code&gt; directory. For example, to create your own copy of the Git repository, you&amp;rsquo;d do the following" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ucy;&yucy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ucy;&yucy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &kcy;&ocy;&pcy;&icy;&yucy; &tcy;&acy;&kcy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  &quot;raw&quot;   Git , &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&jcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ncy;&iecy;&ocy;&bcy;&rcy;&acy;&bcy;&ocy;&tcy;&acy;&ncy;&ncy;&ocy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>.git</code> . &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ucy;&yucy; &kcy;&ocy;&pcy;&icy;&yucy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  Git , &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&iecy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>mkdir my-git
<span class="hljs-variable">$ </span>cd my-git
<span class="hljs-variable">$ </span>rsync -rL <span class="hljs-symbol">rsync:</span>/<span class="hljs-regexp">/rsync.kernel.org/pub</span><span class="hljs-regexp">/scm/git</span><span class="hljs-regexp">/git.git/</span> .git</pre> </div> </div> <p><span data-i18n="0139b47c512cca3e9462097afd24a14220d925fa58c2ef5b414cb8ff02a52694/63" data-source="followed by" onmousemove="i18n(this)">followed by</span></p> <div> <div> <pre class="hljs language-lua">$ git <span class="hljs-built_in">read</span>-tree HEAD</pre> </div> </div> <p><span data-i18n="142a0051e19783eac1ec19eb25d6c5bfaa9c35b14bcb2436abaca80f5b2f6609/96" data-source="to populate the index. However, now you have populated the index, and you have all the Git internal files, but you will notice that you don&amp;rsquo;t actually have any of the working tree files to work on. To get those, you&amp;rsquo;d check them out with" onmousemove="i18n(this)">&dcy;&lcy;&yacy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&icy;&lcy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &vcy;&scy;&iecy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&icy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;  Git , &ncy;&ocy; &vcy;&ycy; &zcy;&acy;&mcy;&iecy;&tcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &ucy; &vcy;&acy;&scy; &ncy;&iecy;&tcy; &ncy;&icy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &ncy;&acy;&dcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &bcy;&ycy;&lcy;&ocy; &bcy;&ycy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy;. &CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &icy;&khcy;, &vcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;&softcy; &icy;&khcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;</span></p> <div> <div> <pre class="hljs language-perl">$ git checkout-<span class="hljs-keyword">index</span> -u -a</pre> </div> </div> <p><span data-i18n="7b997f357cab4c8340d82b80d9c38799c84885b75b3f7c99cfa93800524e6c45/02" data-source="where the &lt;code&gt;-u&lt;/code&gt; flag means that you want the checkout to keep the index up to date (so that you don&amp;rsquo;t have to refresh it afterward), and the &lt;code&gt;-a&lt;/code&gt; flag means &amp;quot;check out all files&amp;quot; (if you have a stale copy or an older version of a checked out tree you may also need to add the &lt;code&gt;-f&lt;/code&gt; flag first, to tell &lt;code&gt;git checkout-index&lt;/code&gt; to &lt;strong&gt;force&lt;/strong&gt; overwriting of any old files)." onmousemove="i18n(this)">&gcy;&dcy;&iecy; &fcy;&lcy;&acy;&gcy;  <code>-u</code>  &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&icy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&icy; &zcy;&acy;&kcy;&acy;&zcy;&acy; &pcy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&ncy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&lcy;&scy;&yacy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; (&chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&acy;&mcy; &ncy;&iecy; &pcy;&rcy;&icy;&khcy;&ocy;&dcy;&icy;&lcy;&ocy;&scy;&softcy; &iecy;&gcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&tcy;&softcy; &vcy;&pcy;&ocy;&scy;&lcy;&iecy;&dcy;&scy;&tcy;&vcy;&icy;&icy;), &acy; &fcy;&lcy;&acy;&gcy;  <code>-a</code>  &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;  &quot;check out all files&quot;  (&iecy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &ucy;&scy;&tcy;&acy;&rcy;&iecy;&vcy;&shcy;&acy;&yacy; &kcy;&ocy;&pcy;&icy;&yacy; &icy;&lcy;&icy; &bcy;&ocy;&lcy;&iecy;&iecy; &scy;&tcy;&acy;&rcy;&acy;&yacy; &vcy;&iecy;&rcy;&scy;&icy;&yacy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &vcy;&acy;&mcy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &pcy;&ocy;&tcy;&rcy;&iecy;&bcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&tcy;&softcy; &fcy;&lcy;&acy;&gcy;  <code>-f</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;  <code>git checkout-index</code>  &pcy;&rcy;&icy;&ncy;&ucy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &lcy;&yucy;&bcy;&ycy;&iecy; &scy;&tcy;&acy;&rcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;).</span></p> <p><span data-i18n="bd20a02e0dd6eba2528a15b486801d575b066467751fe72fc8229dc7c9854592/c4" data-source="Again, this can all be simplified with" onmousemove="i18n(this)">&Ocy;&pcy;&yacy;&tcy;&softcy; &zhcy;&iecy;, &vcy;&scy;&iecy; &ecy;&tcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&pcy;&rcy;&ocy;&scy;&tcy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git clone <span class="hljs-symbol">git:</span>/<span class="hljs-regexp">/git.kernel.org/pub</span><span class="hljs-regexp">/scm/git</span><span class="hljs-regexp">/git.git/</span> my-git
<span class="hljs-variable">$ </span>cd my-git
<span class="hljs-variable">$ </span>git checkout</pre> </div> </div> <p><span data-i18n="e5cc52a874263160304064d0fea0ffd30c269e88e3a687569d8ee455002692a2/4e" data-source="which will end up doing all of the above for you." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&iecy;&tcy; &vcy;&scy;&iecy; &vcy;&ycy;&shcy;&iecy;&pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy; &zcy;&acy; &vcy;&acy;&scy;.</span></p> <p><span data-i18n="fdd1821c32441382fbf87dbb59e1fa4f10f491bab5e6cf970949abe268dc4891/1a" data-source="You have now successfully copied somebody else&amp;rsquo;s (mine) remote repository, and checked it out." onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&ycy; &ucy;&scy;&pcy;&iecy;&shcy;&ncy;&ocy; &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy; &chcy;&ucy;&zhcy;&ocy;&jcy; (&mcy;&ocy;&jcy;) &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&lcy;&icy; &iecy;&gcy;&ocy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_creating_a_new_branch"><span data-i18n="56553c7e6aa5880866adb924e5a337937be8cc08e2bf4e867795bd33adc1bd29/09" data-source="Creating a new branch" onmousemove="i18n(this)">&Scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &ncy;&ocy;&vcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;</span></h2> <div> <p><span data-i18n="5e4a030198e9914dd24b95065f6ebdf1b6484c433ef7c6c0dd9a68d830a08f55/95" data-source="Branches in Git are really nothing more than pointers into the Git object database from within the &lt;code&gt;.git/refs/&lt;/code&gt; subdirectory, and as we already discussed, the &lt;code&gt;HEAD&lt;/code&gt; branch is nothing but a symlink to one of these object pointers." onmousemove="i18n(this)">&Vcy;&iecy;&tcy;&vcy;&icy; &vcy;  Git  &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ncy;&iecy; &chcy;&iecy;&mcy; &icy;&ncy;&ycy;&mcy;, &kcy;&acy;&kcy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&iecy;&lcy;&yacy;&mcy;&icy; &ncy;&acy; &bcy;&acy;&zcy;&ucy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;  Git  &icy;&zcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  <code>.git/refs/</code> , &icy;, &kcy;&acy;&kcy; &mcy;&ycy; &ucy;&zhcy;&iecy; &ocy;&bcy;&scy;&ucy;&zhcy;&dcy;&acy;&lcy;&icy;, &vcy;&iecy;&tcy;&vcy;&softcy;  <code>HEAD</code>  &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &ncy;&iecy; &chcy;&tcy;&ocy; &icy;&ncy;&ocy;&iecy;, &kcy;&acy;&kcy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&kcy;&ucy;&yucy; &scy;&scy;&ycy;&lcy;&kcy;&ucy; &ncy;&acy; &ocy;&dcy;&icy;&ncy; &icy;&zcy; &ecy;&tcy;&icy;&khcy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&iecy;&lcy;&iecy;&jcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;.</span></p> <p><span data-i18n="57ef81953a77a96ea35dc8c1fbbcbcb63744a27e608b2d58b93863dfa0673bd5/24" data-source="You can at any time create a new branch by just picking an arbitrary point in the project history, and just writing the SHA-1 name of that object into a file under &lt;code&gt;.git/refs/heads/&lt;/code&gt;. You can use any filename you want (and indeed, subdirectories), but the convention is that the &amp;quot;normal&amp;quot; branch is called &lt;code&gt;master&lt;/code&gt;. That&amp;rsquo;s just a convention, though, and nothing enforces it." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &vcy; &lcy;&yucy;&bcy;&ocy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&ycy;&bcy;&rcy;&acy;&vcy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&lcy;&softcy;&ncy;&ucy;&yucy; &tcy;&ocy;&chcy;&kcy;&ucy; &vcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &icy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &zcy;&acy;&pcy;&icy;&scy;&acy;&vcy; &icy;&mcy;&yacy; SHA-1 &ecy;&tcy;&ocy;&gcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &vcy; &fcy;&acy;&jcy;&lcy; &pcy;&ocy;&dcy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy;  <code>.git/refs/heads/</code> . &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &lcy;&yucy;&bcy;&ocy;&iecy; &icy;&mcy;&yacy; &fcy;&acy;&jcy;&lcy;&acy; (&icy; &dcy;&acy;&zhcy;&iecy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&icy;), &ncy;&ocy; &pcy;&ocy; &scy;&ocy;&gcy;&lcy;&acy;&shcy;&iecy;&ncy;&icy;&yucy; &vcy;&iecy;&tcy;&kcy;&acy;  &quot;normal&quot;  &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>master</code> . &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &ecy;&tcy;&ocy; &vcy;&scy;&iecy;&gcy;&ocy; &lcy;&icy;&shcy;&softcy; &ucy;&scy;&lcy;&ocy;&vcy;&ncy;&ocy;&scy;&tcy;&softcy;, &icy; &ncy;&icy;&chcy;&tcy;&ocy; &ncy;&iecy; &ocy;&bcy;&iecy;&scy;&pcy;&iecy;&chcy;&icy;&vcy;&acy;&iecy;&tcy; &iecy;&iecy; &scy;&ocy;&bcy;&lcy;&yucy;&dcy;&iecy;&ncy;&icy;&iecy;.</span></p> <p><span data-i18n="44c7beb9be1c7b995b02074d9cd4f66b2899685ed1018b7d9b61c9b3c433949e/ff" data-source="To show that as an example, let&amp;rsquo;s go back to the git-tutorial repository we used earlier, and create a branch in it. You do that by simply just saying that you want to check out a new branch:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&ocy;&dcy;&iecy;&mcy;&ocy;&ncy;&scy;&tcy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&acy;, &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &vcy;&iecy;&rcy;&ncy;&iecy;&mcy;&scy;&yacy; &kcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yucy; git-tutorial, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &mcy;&ycy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&lcy;&icy; &rcy;&acy;&ncy;&iecy;&iecy;, &icy; &scy;&ocy;&zcy;&dcy;&acy;&dcy;&icy;&mcy; &vcy; &ncy;&iecy;&mcy; &vcy;&iecy;&tcy;&kcy;&ucy;. &Vcy;&ycy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;&iecy; &ecy;&tcy;&ocy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &gcy;&ocy;&vcy;&ocy;&rcy;&yacy;, &chcy;&tcy;&ocy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-r"><span class="hljs-operator">$</span> git <span class="hljs-built_in">switch</span> <span class="hljs-operator">-</span><span class="hljs-built_in">c</span> mybranch</pre> </div> </div> <p><span data-i18n="5877b6829b027ecec322f0dbc31d4363c2c32d4509450d179572b7da975f4af2/17" data-source="will create a new branch based at the current &lt;code&gt;HEAD&lt;/code&gt; position, and switch to it." onmousemove="i18n(this)">&scy;&ocy;&zcy;&dcy;&acy;&scy;&tcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &ncy;&acy; &ocy;&scy;&ncy;&ocy;&vcy;&iecy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &pcy;&ocy;&zcy;&icy;&tscy;&icy;&icy;  <code>HEAD</code>  &icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &ncy;&iecy;&iecy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td> <p><span data-i18n="a9f70fb9639d9ece724e223ebff2cc9bacb15f9f6d9172ec950bec37a3a20f34/e1" data-source="If you make the decision to start your new branch at some other point in the history than the current &lt;code&gt;HEAD&lt;/code&gt;, you can do so by just telling &lt;code&gt;git switch&lt;/code&gt; what the base of the checkout would be. In other words, if you have an earlier tag or branch, you&amp;rsquo;d just do" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&rcy;&icy;&mcy;&iecy;&tcy;&iecy; &rcy;&iecy;&shcy;&iecy;&ncy;&icy;&iecy; &ncy;&acy;&chcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &vcy; &kcy;&acy;&kcy;&ocy;&jcy;-&tcy;&ocy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy;, &ocy;&tcy;&lcy;&icy;&chcy;&ncy;&ycy;&jcy; &ocy;&tcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&gcy;&ocy;  <code>HEAD</code>  , &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ucy;&kcy;&acy;&zcy;&acy;&vcy;  <code>git switch</code> , &kcy;&acy;&kcy;&ocy;&jcy; &bcy;&ucy;&dcy;&iecy;&tcy; &bcy;&acy;&zcy;&acy; &ocy;&fcy;&ocy;&rcy;&mcy;&lcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&kcy;&acy;&zcy;&acy;. &Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, &iecy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &bcy;&ocy;&lcy;&iecy;&iecy; &rcy;&acy;&ncy;&ncy;&icy;&jcy; &tcy;&iecy;&gcy; &icy;&lcy;&icy; &vcy;&iecy;&tcy;&kcy;&acy;, &vcy;&acy;&mcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ncy;&ucy;&zhcy;&ncy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-r"><span class="hljs-operator">$</span> git <span class="hljs-built_in">switch</span> <span class="hljs-operator">-</span><span class="hljs-built_in">c</span> mybranch earlier<span class="hljs-operator">-</span>commit</pre> </div> </div> <p><span data-i18n="b598aa070df487444e59221323e0393ec52967bafd8c21aa15f57970f5fd76fc/57" data-source="and it would create the new branch &lt;code&gt;mybranch&lt;/code&gt; at the earlier commit, and check out the state at that time." onmousemove="i18n(this)">&icy; &ocy;&ncy; &scy;&ocy;&zcy;&dcy;&acy;&scy;&tcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>mybranch</code>  &pcy;&rcy;&icy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&mcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&iecy; &icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &ncy;&acy; &tcy;&ocy;&tcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;.</span></p> </td> </tr> </table></div> </div> <p><span data-i18n="45203f5430812a18bb47dd1e824c7d1b69e9e70bf83b9f101ba10522d6924108/68" data-source="You can always just jump back to your original &lt;code&gt;master&lt;/code&gt; branch by doing" onmousemove="i18n(this)">&Vcy;&ycy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;&scy;&yacy; &kcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;  <code>master</code> , &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&vcy;</span></p> <div> <div> <pre class="hljs language-cpp">$ git <span class="hljs-keyword">switch</span> master</pre> </div> </div> <p><span data-i18n="37077a62b1109cfd9994f46de98e1f082466ad7d88181bd4a9c945762058963d/c8" data-source="(or any other branch-name, for that matter) and if you forget which branch you happen to be on, a simple" onmousemove="i18n(this)">(&icy;&lcy;&icy; &lcy;&yucy;&bcy;&ocy;&iecy; &dcy;&rcy;&ucy;&gcy;&ocy;&iecy; &icy;&mcy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy;, &iecy;&scy;&lcy;&icy; &ucy;&zhcy; &ncy;&acy; &tcy;&ocy; &pcy;&ocy;&shcy;&lcy;&ocy;), &icy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &zcy;&acy;&bcy;&ucy;&dcy;&iecy;&tcy;&iecy;, &vcy; &kcy;&acy;&kcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; &vcy;&ycy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&iecy;&scy;&softcy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy;</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">cat</span> .git/HEAD</span></pre> </div> </div> <p><span data-i18n="d803fab4b50677df87e1c40c3b2ee24f1601aa473506f56be169e22cea22fa8d/ce" data-source="will tell you where it&amp;rsquo;s pointing. To get the list of branches you have, you can say" onmousemove="i18n(this)">&scy;&kcy;&acy;&zhcy;&iecy;&tcy; &vcy;&acy;&mcy;, &kcy;&ucy;&dcy;&acy; &ocy;&ncy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;. &CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &scy;&pcy;&icy;&scy;&ocy;&kcy; &icy;&mcy;&iecy;&yucy;&shchcy;&icy;&khcy;&scy;&yacy; &ucy; &vcy;&acy;&scy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git branch</pre> </div> </div> <p><span data-i18n="918e44fcd24445f12090c2e15997d4b65b07ca0440c9932e5c255ea781b9ad47/b4" data-source="which used to be nothing more than a simple script around &lt;code&gt;ls .git/refs/heads&lt;/code&gt;. There will be an asterisk in front of the branch you are currently on." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &rcy;&acy;&ncy;&softcy;&shcy;&iecy; &bcy;&ycy;&lcy; &ncy;&iecy; &chcy;&iecy;&mcy; &icy;&ncy;&ycy;&mcy;, &kcy;&acy;&kcy; &pcy;&rcy;&ocy;&scy;&tcy;&ycy;&mcy; &scy;&kcy;&rcy;&icy;&pcy;&tcy;&ocy;&mcy; &ncy;&acy; &ocy;&scy;&ncy;&ocy;&vcy;&iecy;  <code>ls .git/refs/heads</code> . &Pcy;&iecy;&rcy;&iecy;&dcy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &vcy;&ycy; &scy;&iecy;&jcy;&chcy;&acy;&scy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&iecy;&scy;&softcy;, &bcy;&ucy;&dcy;&iecy;&tcy; &ocy;&tcy;&mcy;&iecy;&chcy;&iecy;&ncy;&acy; &zcy;&vcy;&iecy;&zcy;&dcy;&ocy;&chcy;&kcy;&acy;.</span></p> <p><span data-i18n="0c7f010a929ff63d812fa5105e9682f5b95c0a281251c6a2357e50e9196e031e/c5" data-source="Sometimes you may wish to create a new branch &lt;code&gt;without&lt;/code&gt; actually checking it out and switching to it. If so, just use the command" onmousemove="i18n(this)">&Icy;&ncy;&ocy;&gcy;&dcy;&acy; &vcy;&acy;&mcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &pcy;&ocy;&tcy;&rcy;&iecy;&bcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &ncy;&ocy;&vcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>without</code> , &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&vcy; &iecy;&iecy; &icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&vcy;&shcy;&icy;&scy;&softcy; &ncy;&acy; &ncy;&iecy;&iecy;. &IEcy;&scy;&lcy;&icy; &dcy;&acy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;</span></p> <div> <div> <pre class="hljs language-xml">$ git branch <span class="hljs-tag">&lt;<span class="hljs-name">branchname</span>&gt;</span> [startingpoint]</pre> </div> </div> <p><span data-i18n="8b9ce36328dc4efa5600b6755b3992839860044841d03e1278ea569461557d95/bb" data-source="which will simply &lt;code&gt;create&lt;/code&gt; the branch, but will not do anything further. You can then later &amp;mdash; once you decide that you want to actually develop on that branch &amp;mdash; switch to that branch with a regular &lt;code&gt;git switch&lt;/code&gt; with the branchname as the argument." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&vcy;&iecy;&dcy;&iecy;&tcy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>create</code> , &ncy;&ocy; &dcy;&acy;&lcy;&softcy;&shcy;&iecy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy;. &Pcy;&ocy;&zcy;&zhcy;&iecy; &vcy;&ycy; &scy;&mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &mdash; &kcy;&acy;&kcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &rcy;&iecy;&shcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ucy; &vcy;&iecy;&tcy;&kcy;&ucy; &mdash; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy;&scy;&yacy; &ncy;&acy; &ecy;&tcy;&ucy; &vcy;&iecy;&tcy;&kcy;&ucy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&gcy;&ocy;  <code>git switch</code>  &scy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy; &vcy;&iecy;&tcy;&kcy;&icy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_merging_two_branches"><span data-i18n="53fe97535f9c81b2604f59be3a24124cd4283d948b34ad3bde95c2d4121ad6e5/28" data-source="Merging two branches" onmousemove="i18n(this)">&Ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &dcy;&vcy;&ucy;&khcy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;</span></h2> <div> <p><span data-i18n="7c932665b52af7705f8cd977ca7537ea76bffc6b5512fb8545c7e14a77f3859e/af" data-source="One of the ideas of having a branch is that you do some (possibly experimental) work in it, and eventually merge it back to the main branch. So assuming you created the above &lt;code&gt;mybranch&lt;/code&gt; that started out being the same as the original &lt;code&gt;master&lt;/code&gt; branch, let&amp;rsquo;s make sure we&amp;rsquo;re in that branch, and do some work there." onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy; &icy;&zcy; &icy;&dcy;&iecy;&jcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy; &zcy;&acy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy;&iecy; &vcy; &ncy;&iecy;&jcy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; (&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &ecy;&kcy;&scy;&pcy;&iecy;&rcy;&icy;&mcy;&iecy;&ncy;&tcy;&acy;&lcy;&softcy;&ncy;&ucy;&yucy;) &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &icy; &vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&iecy;&tcy;&iecy; &iecy;&iecy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy; &scy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;. &Icy;&tcy;&acy;&kcy;, &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&ocy;&zhcy;&icy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy; &vcy;&ycy;&shcy;&iecy;&ucy;&pcy;&ocy;&mcy;&yacy;&ncy;&ucy;&tcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy;  <code>mybranch</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &icy;&zcy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy; &bcy;&ycy;&lcy;&acy; &tcy;&acy;&kcy;&ocy;&jcy; &zhcy;&iecy;, &kcy;&acy;&kcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy;  <code>master</code> , &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &ucy;&bcy;&iecy;&dcy;&icy;&mcy;&scy;&yacy;, &chcy;&tcy;&ocy; &mcy;&ycy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&mcy;&scy;&yacy; &vcy; &ecy;&tcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;, &icy; &pcy;&rcy;&ocy;&dcy;&iecy;&lcy;&acy;&iecy;&mcy; &tcy;&acy;&mcy; &ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;.</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash">git switch mybranch</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;Work, work, work&quot;</span> &gt;&gt;hello</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git commit -m <span class="hljs-string">&quot;Some work.&quot;</span> -i hello</span></pre> </div> </div> <p><span data-i18n="5b00c5182e782629e97e83cc336f94923386531456e6a77371d72e7130c77817/af" data-source="Here, we just added another line to &lt;code&gt;hello&lt;/code&gt;, and we used a shorthand for doing both &lt;code&gt;git update-index hello&lt;/code&gt; and &lt;code&gt;git commit&lt;/code&gt; by just giving the filename directly to &lt;code&gt;git commit&lt;/code&gt;, with an &lt;code&gt;-i&lt;/code&gt; flag (it tells Git to &lt;code&gt;include&lt;/code&gt; that file in addition to what you have done to the index file so far when making the commit). The &lt;code&gt;-m&lt;/code&gt; flag is to give the commit log message from the command line." onmousemove="i18n(this)">&Zcy;&dcy;&iecy;&scy;&softcy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &dcy;&ocy;&bcy;&acy;&vcy;&icy;&lcy;&icy; &iecy;&shchcy;&iecy; &ocy;&dcy;&ncy;&ucy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy; &vcy;  <code>hello</code>  &icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&lcy;&icy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&iecy;&ncy;&icy;&iecy; &dcy;&lcy;&yacy;  <code>git update-index hello</code>  &icy;  <code>git commit</code> , &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &zcy;&acy;&dcy;&acy;&vcy; &icy;&mcy;&yacy; &fcy;&acy;&jcy;&lcy;&acy; &ncy;&iecy;&pcy;&ocy;&scy;&rcy;&iecy;&dcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;  <code>git commit</code>  &scy; &fcy;&lcy;&acy;&gcy;&ocy;&mcy;  <code>-i</code>  (&ocy;&ncy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy;  Git   <code>include</code>  &ocy;&bcy; &ecy;&tcy;&ocy;&mcy; &fcy;&acy;&jcy;&lcy;&iecy; &vcy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&iecy; &kcy; &tcy;&ocy;&mcy;&ucy;, &chcy;&tcy;&ocy; &vcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &dcy;&lcy;&yacy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &pcy;&rcy;&icy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&icy;&icy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;). &Fcy;&lcy;&acy;&gcy;  <code>-m</code>  &pcy;&rcy;&iecy;&dcy;&ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy; &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&chcy;&icy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&yacy; &zhcy;&ucy;&rcy;&ncy;&acy;&lcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &icy;&zcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;.</span></p> <p><span data-i18n="1b354f29fd9fbc954b27af589212442ca4a0b19748dfa3f99dd8c2d97119a9f5/a7" data-source="Now, to make it a bit more interesting, let&amp;rsquo;s assume that somebody else does some work in the original branch, and simulate that by going back to the master branch, and editing the same file differently there:" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &bcy;&ycy;&lcy;&ocy; &ncy;&iecy;&mcy;&ncy;&ocy;&gcy;&ocy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&iecy;&iecy;, &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&ocy;&zhcy;&icy;&mcy;, &chcy;&tcy;&ocy; &kcy;&tcy;&ocy;-&tcy;&ocy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy; &kcy;&acy;&kcy;&ucy;&yucy;-&tcy;&ocy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;, &icy; &scy;&mcy;&ocy;&dcy;&iecy;&lcy;&icy;&rcy;&ucy;&iecy;&mcy; &ecy;&tcy;&ocy;, &vcy;&iecy;&rcy;&ncy;&ucy;&vcy;&shcy;&icy;&scy;&softcy; &vcy; &gcy;&lcy;&acy;&vcy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &icy; &ocy;&tcy;&rcy;&iecy;&dcy;&acy;&kcy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&vcy; &tcy;&acy;&mcy; &tcy;&ocy;&tcy; &zhcy;&iecy; &fcy;&acy;&jcy;&lcy; &pcy;&ocy;-&dcy;&rcy;&ucy;&gcy;&ocy;&mcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-cpp">$ git <span class="hljs-keyword">switch</span> master</pre> </div> </div> <p><span data-i18n="5bc1f677a5e426e0d738b29a5c9fe274ad552fff894d5d2b4dd4eb56599020a0/39" data-source="Here, take a moment to look at the contents of &lt;code&gt;hello&lt;/code&gt;, and notice how they don&amp;rsquo;t contain the work we just did in &lt;code&gt;mybranch&lt;/code&gt; &amp;mdash; because that work hasn&amp;rsquo;t happened in the &lt;code&gt;master&lt;/code&gt; branch at all. Then do" onmousemove="i18n(this)">&Zcy;&dcy;&iecy;&scy;&softcy;, &vcy;&zcy;&gcy;&lcy;&yacy;&ncy;&icy;&tcy;&iecy; &ncy;&acy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy;  <code>hello</code>  &icy; &ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &ocy;&ncy;&ocy; &ncy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &vcy;  <code>mybranch</code>  &mdash; &pcy;&ocy;&tcy;&ocy;&mcy;&ucy; &chcy;&tcy;&ocy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  <code>master</code>  &ecy;&tcy;&ocy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &vcy;&ocy;&ocy;&bcy;&shchcy;&iecy; &ncy;&iecy; &bcy;&ycy;&lcy;&ocy;. &Tcy;&ocy;&gcy;&dcy;&acy; &dcy;&iecy;&lcy;&acy;&jcy;</span></p> <div> <div> <pre class="hljs language-shell"><span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;Play, play, play&quot;</span> &gt;&gt;hello</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash"><span class="hljs-built_in">echo</span> <span class="hljs-string">&quot;Lots of fun&quot;</span> &gt;&gt;example</span>
<span class="hljs-meta prompt_">$ </span><span class="language-bash">git commit -m <span class="hljs-string">&quot;Some fun.&quot;</span> -i hello example</span></pre> </div> </div> <p><span data-i18n="19423e6947eec38bbdc13bb1c9559e268492999066aa58691769d2f8ab4b554c/ac" data-source="since the master branch is obviously in a much better mood." onmousemove="i18n(this)">&pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &gcy;&lcy;&acy;&vcy;&ncy;&acy;&yacy; &vcy;&iecy;&tcy;&kcy;&acy; &yacy;&vcy;&ncy;&ocy; &vcy; &gcy;&ocy;&rcy;&acy;&zcy;&dcy;&ocy; &lcy;&ucy;&chcy;&shcy;&iecy;&mcy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy;&icy;&icy;.</span></p> <p><span data-i18n="17d2e273b99a6995c82ae1a248d737d57248333215df6af8bd3ebdac9216e37f/fe" data-source="Now, you&amp;rsquo;ve got two branches, and you decide that you want to merge the work done. Before we do that, let&amp;rsquo;s introduce a cool graphical tool that helps you view what&amp;rsquo;s going on:" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &dcy;&vcy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy;, &icy; &vcy;&ycy; &rcy;&iecy;&shcy;&acy;&iecy;&tcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &pcy;&rcy;&ocy;&dcy;&iecy;&lcy;&acy;&ncy;&ncy;&ucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;. &Pcy;&rcy;&iecy;&zhcy;&dcy;&iecy; &chcy;&iecy;&mcy; &mcy;&ycy; &ecy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&iecy;&mcy;, &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&icy;&mcy; &kcy;&lcy;&acy;&scy;&scy;&ncy;&ycy;&jcy; &gcy;&rcy;&acy;&fcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&jcy; &icy;&ncy;&scy;&tcy;&rcy;&ucy;&mcy;&iecy;&ncy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &pcy;&ocy;&mcy;&ocy;&zhcy;&iecy;&tcy; &vcy;&acy;&mcy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &chcy;&tcy;&ocy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy;:</span></p> <div> <div> <pre class="hljs language-lua">$ gitk <span class="hljs-comment">--all</span></pre> </div> </div> <p><span data-i18n="9f3736a12bd84b8ffd9583d641d6a97ee7a3c4308db63556bc32e5d41250c7f7/6f" data-source="will show you graphically both of your branches (that&amp;rsquo;s what the &lt;code&gt;--all&lt;/code&gt; means: normally it will just show you your current &lt;code&gt;HEAD&lt;/code&gt;) and their histories. You can also see exactly how they came to be from a common source." onmousemove="i18n(this)">&gcy;&rcy;&acy;&fcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &pcy;&ocy;&kcy;&acy;&zhcy;&iecy;&tcy; &vcy;&acy;&mcy; &ocy;&bcy;&iecy; &vcy;&acy;&shcy;&icy; &vcy;&iecy;&tcy;&kcy;&icy; (&ecy;&tcy;&ocy; &tcy;&ocy;, &chcy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;  <code>--all</code> : &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ocy;&ncy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &vcy;&acy;&mcy; &vcy;&acy;&shcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&jcy;  <code>HEAD</code> ) &icy; &icy;&khcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy;. &Vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &kcy;&acy;&kcy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &ocy;&ncy;&icy; &vcy;&ocy;&zcy;&ncy;&icy;&kcy;&lcy;&icy; &icy;&zcy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &icy;&scy;&tcy;&ocy;&chcy;&ncy;&icy;&kcy;&acy;.</span></p> <p><span data-i18n="969274a7ec234a379a7c35d1c2f601604bf1616253dc8d1b5ac629705a0090bc/9e" data-source="Anyway, let&amp;rsquo;s exit &lt;code&gt;gitk&lt;/code&gt; (&lt;code&gt;^Q&lt;/code&gt; or the File menu), and decide that we want to merge the work we did on the &lt;code&gt;mybranch&lt;/code&gt; branch into the &lt;code&gt;master&lt;/code&gt; branch (which is currently our &lt;code&gt;HEAD&lt;/code&gt; too). To do that, there&amp;rsquo;s a nice script called &lt;code&gt;git merge&lt;/code&gt;, which wants to know which branches you want to resolve and what the merge is all about:" onmousemove="i18n(this)">&Vcy; &lcy;&yucy;&bcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &vcy;&ycy;&jcy;&dcy;&iecy;&mcy; &icy;&zcy;  <code>gitk</code>  ( <code>^Q</code>  &icy;&lcy;&icy; &mcy;&iecy;&ncy;&yucy; &laquo;&Fcy;&acy;&jcy;&lcy;&raquo;) &icy; &rcy;&iecy;&shcy;&icy;&mcy;, &chcy;&tcy;&ocy; &mcy;&ycy; &khcy;&ocy;&tcy;&icy;&mcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &mcy;&ycy; &pcy;&rcy;&ocy;&dcy;&iecy;&lcy;&acy;&lcy;&icy; &ncy;&acy;&dcy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>mybranch</code> , &scy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>master</code>  (&kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &vcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&iecy; &vcy;&rcy;&iecy;&mcy;&yacy; &tcy;&acy;&kcy;&zhcy;&iecy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ncy;&acy;&shcy;&iecy;&jcy;  <code>HEAD</code> ). &Dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &iecy;&scy;&tcy;&softcy; &khcy;&ocy;&rcy;&ocy;&shcy;&icy;&jcy; &scy;&kcy;&rcy;&icy;&pcy;&tcy; &pcy;&ocy;&dcy; &ncy;&acy;&zcy;&vcy;&acy;&ncy;&icy;&iecy;&mcy;  <code>git merge</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &khcy;&ocy;&chcy;&iecy;&tcy; &zcy;&ncy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy;&icy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&softcy; &icy; &vcy; &chcy;&iecy;&mcy; &scy;&ucy;&tcy;&softcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git merge -m <span class="hljs-string">&quot;Merge work in mybranch&quot;</span> mybranch</pre> </div> </div> <p><span data-i18n="a9d866adad74b3a73299031545bdbd11b9bbc4938868cb803869a5f71300ab59/4f" data-source="where the first argument is going to be used as the commit message if the merge can be resolved automatically." onmousemove="i18n(this)">&gcy;&dcy;&iecy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&yacy; &ocy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &iecy;&scy;&lcy;&icy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&iecy;&ncy;&ocy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;.</span></p> <p><span data-i18n="c74bdb6e032afddec37e084c67e94cdf1dcc1cbc58c2fb83f76a32a328783934/86" data-source="Now, in this case we&amp;rsquo;ve intentionally created a situation where the merge will need to be fixed up by hand, though, so Git will do as much of it as it can automatically (which in this case is just merge the &lt;code&gt;example&lt;/code&gt; file, which had no differences in the &lt;code&gt;mybranch&lt;/code&gt; branch), and say:" onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &mcy;&ycy; &ncy;&acy;&mcy;&iecy;&rcy;&iecy;&ncy;&ncy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&lcy;&icy; &scy;&icy;&tcy;&ucy;&acy;&tscy;&icy;&yucy;, &kcy;&ocy;&gcy;&dcy;&acy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&icy;&tcy;&softcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy;  Git  &scy;&dcy;&iecy;&lcy;&acy;&iecy;&tcy; &vcy;&scy;&iecy; &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;&iecy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; (&vcy; &dcy;&acy;&ncy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &fcy;&acy;&jcy;&lcy;&acy;  <code>example</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&iecy; &icy;&mcy;&iecy;&lcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&jcy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  <code>mybranch</code> ), &icy; &scy;&kcy;&acy;&zhcy;&icy;&tcy;&iecy;:</span></p> <div> <div> <pre class="hljs language-sql">        Auto<span class="hljs-operator">-</span>merging hello
        CONFLICT (content): <span class="hljs-keyword">Merge</span> conflict <span class="hljs-keyword">in</span> hello
        Automatic <span class="hljs-keyword">merge</span> failed; fix conflicts <span class="hljs-keyword">and</span> <span class="hljs-keyword">then</span> <span class="hljs-keyword">commit</span> the result.</pre> </div> </div> <p><span data-i18n="a108d51b568f7a3fa8a7c1d558845fc389614606cb118a9347c0bbd4502560b7/14" data-source="It tells you that it did an &amp;quot;Automatic merge&amp;quot;, which failed due to conflicts in &lt;code&gt;hello&lt;/code&gt;." onmousemove="i18n(this)">&Vcy; &ncy;&iecy;&mcy; &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy; &ocy;&ncy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&lcy;  &quot;Automatic merge&quot; , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy;&ycy;&shcy;&iecy;&lcy; &icy;&zcy; &scy;&tcy;&rcy;&ocy;&yacy; &icy;&zcy;-&zcy;&acy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ocy;&vcy; &vcy;  <code>hello</code> .</span></p> <p><span data-i18n="067c284a734928211db93b4f57be8f5c78d1155ec30543f157caebab29e855d7/0a" data-source="Not to worry. It left the (trivial) conflict in &lt;code&gt;hello&lt;/code&gt; in the same form you should already be well used to if you&amp;rsquo;ve ever used CVS, so let&amp;rsquo;s just open &lt;code&gt;hello&lt;/code&gt; in our editor (whatever that may be), and fix it up somehow. I&amp;rsquo;d suggest just making it so that &lt;code&gt;hello&lt;/code&gt; contains all four lines:" onmousemove="i18n(this)">&Ncy;&iecy; &bcy;&iecy;&scy;&pcy;&ocy;&kcy;&ocy;&icy;&tcy;&softcy;&scy;&yacy;. &Ecy;&tcy;&ocy; &ocy;&scy;&tcy;&acy;&vcy;&icy;&lcy;&ocy; (&tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy;) &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy; &vcy;  <code>hello</code>  &vcy; &tcy;&ocy;&jcy; &zhcy;&iecy; &fcy;&ocy;&rcy;&mcy;&iecy;, &kcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &vcy;&ycy; &ucy;&zhcy;&iecy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &bcy;&ycy;&lcy;&icy; &khcy;&ocy;&rcy;&ocy;&shcy;&ocy; &pcy;&rcy;&icy;&vcy;&ycy;&kcy;&ncy;&ucy;&tcy;&softcy;, &iecy;&scy;&lcy;&icy; &kcy;&ocy;&gcy;&dcy;&acy;-&lcy;&icy;&bcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&lcy;&icy; CVS, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&tcy;&kcy;&rcy;&ocy;&iecy;&mcy;  <code>hello</code>  &vcy; &ncy;&acy;&shcy;&iecy;&mcy; &rcy;&iecy;&dcy;&acy;&kcy;&tcy;&ocy;&rcy;&iecy; (&kcy;&acy;&kcy;&icy;&mcy; &bcy;&ycy; &ocy;&ncy; &ncy;&icy; &bcy;&ycy;&lcy;) &icy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&icy;&mcy; &iecy;&gcy;&ocy; &kcy;&acy;&kcy;-&ncy;&icy;&bcy;&ucy;&dcy;&softcy;. &YAcy; &bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&lcy;&ocy;&zhcy;&icy;&lcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &tcy;&acy;&kcy;, &chcy;&tcy;&ocy;&bcy;&ycy;  <code>hello</code>  &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&lcy; &vcy;&scy;&iecy; &chcy;&iecy;&tcy;&ycy;&rcy;&iecy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;:</span></p> <div> <div> <pre class="hljs language-rust">Hello World
It<span class="hljs-symbol">&apos;s</span> a new day <span class="hljs-keyword">for</span> <span class="hljs-title class_">git</span>
Play, play, play
Work, work, work</pre> </div> </div> <p><span data-i18n="b8d7cda4676c26d0a7c76ce2800c4346b00a830e30038432506dde340b3dcde1/01" data-source="and once you&amp;rsquo;re happy with your manual merge, just do a" onmousemove="i18n(this)">&icy; &kcy;&acy;&kcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &bcy;&ucy;&dcy;&iecy;&tcy;&iecy; &dcy;&ocy;&vcy;&ocy;&lcy;&softcy;&ncy;&ycy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy;&mcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;, &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git commit -i hello</pre> </div> </div> <p><span data-i18n="0b7a2f9531807aa0a5bab919b1574d443e7f8259509a2231359278d166a23361/2b" data-source="which will very loudly warn you that you&amp;rsquo;re now committing a merge (which is correct, so never mind), and you can write a small merge message about your adventures in &lt;code&gt;git merge&lt;/code&gt;-land." onmousemove="i18n(this)">&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ocy;&chcy;&iecy;&ncy;&softcy; &gcy;&rcy;&ocy;&mcy;&kcy;&ocy; &pcy;&rcy;&iecy;&dcy;&ucy;&pcy;&rcy;&iecy;&dcy;&icy;&tcy; &vcy;&acy;&scy; &ocy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &scy;&iecy;&jcy;&chcy;&acy;&scy; &scy;&ocy;&vcy;&iecy;&rcy;&shcy;&acy;&iecy;&tcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; (&ecy;&tcy;&ocy; &pcy;&rcy;&acy;&vcy;&icy;&lcy;&softcy;&ncy;&ocy;, &tcy;&acy;&kcy; &chcy;&tcy;&ocy; &ncy;&iecy;&vcy;&acy;&zhcy;&ncy;&ocy;), &icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy; &ncy;&iecy;&bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&iecy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy; &ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&icy; &ocy; &scy;&vcy;&ocy;&icy;&khcy; &pcy;&rcy;&icy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&yacy;&khcy; &vcy;  <code>git merge</code> -land.</span></p> <p><span data-i18n="8aa7b4a405a5eaa11b4fad53eaf410844ea8da68dff44d5cd819fa0b5bd1e3c0/5a" data-source="After you&amp;rsquo;re done, start up &lt;code&gt;gitk --all&lt;/code&gt; to see graphically what the history looks like. Notice that &lt;code&gt;mybranch&lt;/code&gt; still exists, and you can switch to it, and continue to work with it if you want to. The &lt;code&gt;mybranch&lt;/code&gt; branch will not contain the merge, but next time you merge it from the &lt;code&gt;master&lt;/code&gt; branch, Git will know how you merged it, so you&amp;rsquo;ll not have to do &lt;code&gt;that&lt;/code&gt; merge again." onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &zcy;&acy;&vcy;&iecy;&rcy;&shcy;&iecy;&ncy;&icy;&yacy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy;  <code>gitk --all</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &gcy;&rcy;&acy;&fcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &kcy;&acy;&kcy; &vcy;&ycy;&gcy;&lcy;&yacy;&dcy;&icy;&tcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yacy;. &Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy;  <code>mybranch</code>  &vcy;&scy;&iecy; &iecy;&shchcy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &icy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy;&scy;&yacy; &ncy;&acy; &ncy;&iecy;&gcy;&ocy; &icy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&icy;&tcy;&softcy; &scy; &ncy;&icy;&mcy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;, &iecy;&scy;&lcy;&icy; &zcy;&acy;&khcy;&ocy;&tcy;&icy;&tcy;&iecy;. &Vcy;&iecy;&tcy;&kcy;&acy;  <code>mybranch</code>  &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;, &ncy;&ocy; &vcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&jcy; &rcy;&acy;&zcy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&iecy; &iecy;&iecy; &scy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>master</code> ,  Git  &bcy;&ucy;&dcy;&iecy;&tcy; &zcy;&ncy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy; &vcy;&ycy; &iecy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&lcy;&icy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &vcy;&acy;&mcy; &ncy;&iecy; &pcy;&rcy;&icy;&dcy;&iecy;&tcy;&scy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&tcy;&softcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;  <code>that</code>  &scy;&ncy;&ocy;&vcy;&acy;.</span></p> <p><span data-i18n="d0d534ec15d0cb6cc9c0b83ef3008a459f963e28b4caa9b8f722d436e4d4369b/12" data-source="Another useful tool, especially if you do not always work in X-Window environment, is &lt;code&gt;git show-branch&lt;/code&gt;." onmousemove="i18n(this)">&IEcy;&shchcy;&iecy; &ocy;&dcy;&icy;&ncy; &pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ycy;&jcy; &icy;&ncy;&scy;&tcy;&rcy;&ucy;&mcy;&iecy;&ncy;&tcy;, &ocy;&scy;&ocy;&bcy;&iecy;&ncy;&ncy;&ocy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &ncy;&iecy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;&iecy; &vcy; &scy;&rcy;&iecy;&dcy;&iecy; X-Window, &mdash;  <code>git show-branch</code> .</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">show</span><span class="hljs-operator">-</span>branch <span class="hljs-comment" title="--topo-order --more=1 master mybranch">--topo-order --more=1 &mcy;&acy;&scy;&tcy;&iecy;&rcy; &mcy;&ocy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;</span>
<span class="hljs-operator">*</span> [master] <span class="hljs-keyword">Merge</span> work <span class="hljs-keyword">in</span> mybranch
 <span class="hljs-operator">!</span> [mybranch] <span class="hljs-keyword">Some</span> work.
<span class="hljs-comment">--</span>
<span class="hljs-operator">-</span>  [master] <span class="hljs-keyword">Merge</span> work <span class="hljs-keyword">in</span> mybranch
<span class="hljs-operator">*</span><span class="hljs-operator">+</span> [mybranch] <span class="hljs-keyword">Some</span> work.
<span class="hljs-operator">*</span>  [master<span class="hljs-operator">^</span>] <span class="hljs-keyword">Some</span> fun.</pre> </div> </div> <p><span data-i18n="1efc37c3c0aefae3736ce10277fadbbd7502874f1143a4321e1cfcf7709cfc92/24" data-source="The first two lines indicate that it is showing the two branches with the titles of their top-of-the-tree commits, you are currently on &lt;code&gt;master&lt;/code&gt; branch (notice the asterisk &lt;code&gt;*&lt;/code&gt; character), and the first column for the later output lines is used to show commits contained in the &lt;code&gt;master&lt;/code&gt; branch, and the second column for the &lt;code&gt;mybranch&lt;/code&gt; branch. Three commits are shown along with their titles. All of them have non blank characters in the first column (&lt;code&gt;*&lt;/code&gt; shows an ordinary commit on the current branch, &lt;code&gt;-&lt;/code&gt; is a merge commit), which means they are now part of the &lt;code&gt;master&lt;/code&gt; branch. Only the &amp;quot;Some work&amp;quot; commit has the plus &lt;code&gt;+&lt;/code&gt; character in the second column, because &lt;code&gt;mybranch&lt;/code&gt; has not been merged to incorporate these commits from the master branch. The string inside brackets before the commit log message is a short name you can use to name the commit. In the above example, &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;mybranch&lt;/code&gt; are branch heads. &lt;code&gt;master^&lt;/code&gt; is the first parent of &lt;code&gt;master&lt;/code&gt; branch head. Please see &lt;a href=&quot;gitrevisions&quot;&gt;gitrevisions[7]&lt;/a&gt; if you want to see more complex cases." onmousemove="i18n(this)">&Pcy;&iecy;&rcy;&vcy;&ycy;&iecy; &dcy;&vcy;&iecy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy;, &chcy;&tcy;&ocy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&ncy;&ycy; &dcy;&vcy;&iecy; &vcy;&iecy;&tcy;&vcy;&icy; &scy; &ncy;&acy;&zcy;&vcy;&acy;&ncy;&icy;&yacy;&mcy;&icy; &icy;&khcy; &vcy;&iecy;&rcy;&khcy;&ncy;&icy;&khcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;, &vcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&iecy; &vcy;&rcy;&iecy;&mcy;&yacy; &vcy;&ycy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&iecy;&scy;&softcy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  <code>master</code>  (&ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy; &ncy;&acy; &scy;&icy;&mcy;&vcy;&ocy;&lcy; &zcy;&vcy;&iecy;&zcy;&dcy;&ocy;&chcy;&kcy;&icy;  <code>*</code> ), &acy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &scy;&tcy;&ocy;&lcy;&bcy;&iecy;&tscy; &dcy;&lcy;&yacy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&khcy; &scy;&tcy;&rcy;&ocy;&kcy; &vcy;&ycy;&vcy;&ocy;&dcy;&acy;: &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &dcy;&lcy;&yacy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&iecy;&ncy;&icy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&khcy;&scy;&yacy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  <code>master</code> , &icy; &vcy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &scy;&tcy;&ocy;&lcy;&bcy;&tscy;&acy; &dcy;&lcy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy;  <code>mybranch</code> . &Tcy;&rcy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&ncy;&ycy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &scy; &icy;&khcy; &ncy;&acy;&zcy;&vcy;&acy;&ncy;&icy;&yacy;&mcy;&icy;. &Vcy;&scy;&iecy; &ocy;&ncy;&icy; &icy;&mcy;&iecy;&yucy;&tcy; &ncy;&iecy;&pcy;&ucy;&scy;&tcy;&ycy;&iecy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy; &vcy; &pcy;&iecy;&rcy;&vcy;&ocy;&mcy; &scy;&tcy;&ocy;&lcy;&bcy;&tscy;&iecy; ( <code>*</code>  &pcy;&ocy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &vcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;,  <code>-</code>  &mdash; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;), &chcy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &ocy;&ncy;&icy; &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &chcy;&acy;&scy;&tcy;&softcy;&yucy; &vcy;&iecy;&tcy;&kcy;&icy;  <code>master</code> . &Tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  &quot;Some work&quot;  &icy;&mcy;&iecy;&iecy;&tcy; &scy;&icy;&mcy;&vcy;&ocy;&lcy; &pcy;&lcy;&yucy;&scy;  <code>+</code>  &vcy;&ocy; &vcy;&tcy;&ocy;&rcy;&ocy;&mcy; &scy;&tcy;&ocy;&lcy;&bcy;&tscy;&iecy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy;  <code>mybranch</code>  &ncy;&iecy; &bcy;&ycy;&lcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy; &dcy;&lcy;&yacy; &vcy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&yacy; &ecy;&tcy;&icy;&khcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy; &icy;&zcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;. &Scy;&tcy;&rcy;&ocy;&kcy;&acy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &scy;&kcy;&ocy;&bcy;&ocy;&kcy; &pcy;&iecy;&rcy;&iecy;&dcy; &scy;&ocy;&ocy;&bcy;&shchcy;&iecy;&ncy;&icy;&iecy;&mcy; &zhcy;&ucy;&rcy;&ncy;&acy;&lcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &mdash; &ecy;&tcy;&ocy; &kcy;&ocy;&rcy;&ocy;&tcy;&kcy;&ocy;&iecy; &icy;&mcy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&iecy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &ocy;&bcy;&ocy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;. &Vcy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ocy;&mcy; &vcy;&ycy;&shcy;&iecy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;  <code>master</code>  &icy;  <code>mybranch</code>  &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &gcy;&ocy;&lcy;&ocy;&vcy;&kcy;&acy;&mcy;&icy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;.  <code>master^</code>  &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &pcy;&iecy;&rcy;&vcy;&ycy;&mcy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&iecy;&mcy; &gcy;&lcy;&acy;&vcy;&ycy; &vcy;&iecy;&tcy;&kcy;&icy;  <code>master</code> . &IEcy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy; &bcy;&ocy;&lcy;&iecy;&iecy; &scy;&lcy;&ocy;&zhcy;&ncy;&ycy;&iecy; &scy;&lcy;&ucy;&chcy;&acy;&icy;, &scy;&mcy;.  <a href="gitrevisions.html">gitrevisions[7]</a> .</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="632a7336907de64579c08229de60c91cb7bf9d16204f4cdca05b56b729f39231/17" data-source="Without the &lt;em&gt;--more=1&lt;/em&gt; option, &lt;em&gt;git show-branch&lt;/em&gt; would not output the &lt;em&gt;[master^]&lt;/em&gt; commit, as &lt;em&gt;[mybranch]&lt;/em&gt; commit is a common ancestor of both &lt;em&gt;master&lt;/em&gt; and &lt;em&gt;mybranch&lt;/em&gt; tips. Please see &lt;a href=&quot;git-show-branch&quot;&gt;git-show-branch[1]&lt;/a&gt; for details." onmousemove="i18n(this)">&Bcy;&iecy;&zcy; &ocy;&pcy;&tscy;&icy;&icy; --more=1  git  show-branch &ncy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &vcy;&ycy;&vcy;&ocy;&dcy;&icy;&tcy;&softcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; [master^], &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; [mybranch] &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ocy;&bcy;&shchcy;&icy;&mcy; &pcy;&rcy;&iecy;&dcy;&kcy;&ocy;&mcy; &scy;&ocy;&vcy;&iecy;&tcy;&ocy;&vcy; master &icy; mybranch. &Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &scy;&mcy;. &vcy;  <a href="git-show-branch.html">git-show-branch[1]</a> .</span></td> </tr> </table></div> </div> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="7c7a011f850ad1e8e86f6f4996ee07d1fd186d09b89dc5412576441ee8cddd5c/89" data-source="If there were more commits on the &lt;em&gt;master&lt;/em&gt; branch after the merge, the merge commit itself would not be shown by &lt;em&gt;git show-branch&lt;/em&gt; by default. You would need to provide &lt;code&gt;--sparse&lt;/code&gt; option to make the merge commit visible in this case." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &bcy;&ycy; &pcy;&ocy;&scy;&lcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &vcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy; &bcy;&ycy;&lcy;&ocy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;, &scy;&acy;&mcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &ncy;&iecy; &ocy;&tcy;&ocy;&bcy;&rcy;&acy;&zhcy;&acy;&lcy;&scy;&yacy; &bcy;&ycy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  git  &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;. &Vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&rcy;&iecy;&dcy;&ocy;&scy;&tcy;&acy;&vcy;&icy;&tcy;&softcy; &ocy;&pcy;&tscy;&icy;&yucy;  <code>--sparse</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yucy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &vcy;&icy;&dcy;&icy;&mcy;&ocy;&jcy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="5e49b981da42b50f1abc2064f417b548f8d7082be6d05fbdc086946b3374c39e/48" data-source="Now, let&amp;rsquo;s pretend you are the one who did all the work in &lt;code&gt;mybranch&lt;/code&gt;, and the fruit of your hard work has finally been merged to the &lt;code&gt;master&lt;/code&gt; branch. Let&amp;rsquo;s go back to &lt;code&gt;mybranch&lt;/code&gt;, and run &lt;code&gt;git merge&lt;/code&gt; to get the &amp;quot;upstream changes&amp;quot; back to your branch." onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&icy;&mcy;, &chcy;&tcy;&ocy; &vcy;&ycy; &mdash; &tcy;&ocy;&tcy;, &kcy;&tcy;&ocy; &pcy;&rcy;&ocy;&dcy;&iecy;&lcy;&acy;&lcy; &vcy;&scy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &ncy;&acy;&dcy;  <code>mybranch</code> , &icy; &pcy;&lcy;&ocy;&dcy; &vcy;&acy;&shcy;&iecy;&jcy; &tcy;&yacy;&zhcy;&iecy;&lcy;&ocy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &ncy;&acy;&kcy;&ocy;&ncy;&iecy;&tscy;-&tcy;&ocy; &bcy;&ycy;&lcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy; &scy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>master</code> . &Dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &vcy;&iecy;&rcy;&ncy;&iecy;&mcy;&scy;&yacy; &kcy;  <code>mybranch</code>  &icy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;  <code>git merge</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;  &quot;upstream changes&quot;  &vcy; &vcy;&acy;&shcy;&ucy; &vcy;&iecy;&tcy;&kcy;&ucy;.</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git switch mybranch
<span class="hljs-variable">$ </span>git merge -m <span class="hljs-string">&quot;Merge upstream changes.&quot;</span> master</pre> </div> </div> <p><span data-i18n="8dd1541400e03e7dc5f1d6df378b880b9337c626528d88ce66a55afb8eded5e4/7b" data-source="This outputs something like this (the actual commit object names would be different)" onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &vcy;&ycy;&vcy;&ocy;&dcy;&icy;&tcy; &chcy;&tcy;&ocy;-&tcy;&ocy; &vcy;&rcy;&ocy;&dcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; (&fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&iecy; &icy;&mcy;&iecy;&ncy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &bcy;&ucy;&dcy;&ucy;&tcy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy;)</span></p> <div> <div> <pre class="hljs language-vbnet">Updating <span class="hljs-keyword">from</span> ae3a2da... <span class="hljs-keyword">to</span> a80b4aa....
Fast-forward (no commit created; -m <span class="hljs-keyword">option</span> ignored)
 example | <span class="hljs-number">1</span> +
 hello   | <span class="hljs-number">1</span> +
 <span class="hljs-number">2</span> files changed, <span class="hljs-number">2</span> insertions(+)</pre> </div> </div> <p><span data-i18n="db1192c28de90427aeb4457c7f58f5770edd856c2d02336d44d803b62bab7634/c9" data-source="Because your branch did not contain anything more than what had already been merged into the &lt;code&gt;master&lt;/code&gt; branch, the merge operation did not actually do a merge. Instead, it just updated the top of the tree of your branch to that of the &lt;code&gt;master&lt;/code&gt; branch. This is often called &lt;code&gt;fast-forward&lt;/code&gt; merge." onmousemove="i18n(this)">&Pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &vcy;&acy;&shcy;&acy; &vcy;&iecy;&tcy;&kcy;&acy; &ncy;&iecy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&lcy;&acy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy;, &kcy;&rcy;&ocy;&mcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &ucy;&zhcy;&iecy; &bcy;&ycy;&lcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&ocy; &scy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;  <code>master</code> , &ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&yacy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &ncy;&iecy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&lcy;&acy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &ocy;&ncy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&lcy; &vcy;&iecy;&rcy;&khcy;&ncy;&yucy;&yucy; &chcy;&acy;&scy;&tcy;&softcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &vcy;&acy;&shcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy; &dcy;&ocy; &vcy;&iecy;&tcy;&kcy;&icy;  <code>master</code> . &Ecy;&tcy;&ocy; &chcy;&acy;&scy;&tcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;&mcy;  <code>fast-forward</code> .</span></p> <p><span data-i18n="6e231f55e3c18871b8b7eece24294761a9f35747b6f55e7bdbf4bf572c3c1c26/4b" data-source="You can run &lt;code&gt;gitk --all&lt;/code&gt; again to see how the commit ancestry looks like, or run &lt;code&gt;show-branch&lt;/code&gt;, which tells you this." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&ncy;&ocy;&vcy;&acy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>gitk --all</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&vcy;&icy;&dcy;&iecy;&tcy;&softcy;, &kcy;&acy;&kcy; &vcy;&ycy;&gcy;&lcy;&yacy;&dcy;&icy;&tcy; &pcy;&rcy;&iecy;&dcy;&ocy;&kcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &icy;&lcy;&icy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>show-branch</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy; &vcy;&acy;&mcy; &ocy;&bcy; &ecy;&tcy;&ocy;&mcy;.</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">show</span><span class="hljs-operator">-</span>branch master mybranch
<span class="hljs-operator">!</span> [master] <span class="hljs-keyword">Merge</span> work <span class="hljs-keyword">in</span> mybranch
 <span class="hljs-operator">*</span> [mybranch] <span class="hljs-keyword">Merge</span> work <span class="hljs-keyword">in</span> mybranch
<span class="hljs-comment">--</span>
<span class="hljs-comment">-- [master] Merge work in mybranch</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_merging_external_work"><span data-i18n="1c412733edc2dd134633ec84dc50aa3a07734f453bc3405d88703e0f2cdb0116/ab" data-source="Merging external work" onmousemove="i18n(this)">&Ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &vcy;&ncy;&iecy;&shcy;&ncy;&iecy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy;</span></h2> <div> <p><span data-i18n="4e490efb0ea7d8788d33bf9ca91219538f7931d5790bcaae26bc4764e087d4e1/a8" data-source="It&amp;rsquo;s usually much more common that you merge with somebody else than merging with your own branches, so it&amp;rsquo;s worth pointing out that Git makes that very easy too, and in fact, it&amp;rsquo;s not that different from doing a &lt;code&gt;git merge&lt;/code&gt;. In fact, a remote merge ends up being nothing more than &amp;quot;fetch the work from a remote repository into a temporary tag&amp;quot; followed by a &lt;code&gt;git merge&lt;/code&gt;." onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &gcy;&ocy;&rcy;&acy;&zcy;&dcy;&ocy; &chcy;&acy;&shchcy;&iecy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy; &kcy;&iecy;&mcy;-&tcy;&ocy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;, &chcy;&iecy;&mcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &scy;&ocy; &scy;&vcy;&ocy;&icy;&mcy;&icy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &vcy;&iecy;&tcy;&vcy;&yacy;&mcy;&icy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &scy;&tcy;&ocy;&icy;&tcy; &ocy;&tcy;&mcy;&iecy;&tcy;&icy;&tcy;&softcy;, &chcy;&tcy;&ocy;  Git  &tcy;&ocy;&zhcy;&iecy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy; &ecy;&tcy;&ocy; &ocy;&chcy;&iecy;&ncy;&softcy; &lcy;&iecy;&gcy;&kcy;&ocy;, &icy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &ecy;&tcy;&ocy; &ncy;&iecy; &scy;&icy;&lcy;&softcy;&ncy;&ocy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&tcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy;  <code>git merge</code>  . &Fcy;&acy;&kcy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;, &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &ncy;&iecy; &chcy;&tcy;&ocy; &icy;&ncy;&ocy;&iecy;, &kcy;&acy;&kcy;  &quot;fetch the work from a remote repository into a temporary tag&quot; , &zcy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy;  <code>git merge</code> .</span></p> <p><span data-i18n="10f45b9fea1ce52b6b27421e9ca563f36b3b7e382e3a84b830c0d1165f84c90f/15" data-source="Fetching from a remote repository is done by, unsurprisingly, &lt;code&gt;git fetch&lt;/code&gt;:" onmousemove="i18n(this)">&Zcy;&acy;&gcy;&rcy;&ucy;&zcy;&kcy;&acy; &icy;&zcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &chcy;&tcy;&ocy; &ncy;&iecy;&ucy;&dcy;&icy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy;, &ocy;&scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git fetch</code> :</span></p> <div> <div> <pre class="hljs language-xml">$ git fetch <span class="hljs-tag">&lt;<span class="hljs-name">remote-repository</span>&gt;</span></pre> </div> </div> <p><span data-i18n="f90273336111c3ed86c64442df5143f3480ec70e825b28a7f4a35a5a193ffb14/34" data-source="One of the following transports can be used to name the repository to download from:" onmousemove="i18n(this)">&Dcy;&lcy;&yacy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &dcy;&lcy;&yacy; &zcy;&acy;&gcy;&rcy;&ucy;&zcy;&kcy;&icy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &ocy;&dcy;&icy;&ncy; &icy;&zcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&khcy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;&ocy;&vcy;:</span></p> <div> <dl> <dt id="Documentation/gitcore-tutorial.txt-SSH"><span data-i18n="01c4d3c21642b21743ccae2d702002687dd4fdba6746caedf29b19a755f97533/90" data-source="SSH" onmousemove="i18n(this)">SSH</span></dt> <dd> <p><span data-i18n="5dba1e4037555c42fdd5a15f7715ef0522cecef6abfe162794da84e330b3638e/43" data-source="&lt;code&gt;remote.machine:/path/to/repo.git/&lt;/code&gt; or" onmousemove="i18n(this)"><code>remote.machine:/path/to/repo.git/</code> or</span></p> <p><code>ssh://remote.machine/path/to/repo.git/</code></p> <p><span data-i18n="ae3f565828eeb5211d07b1ecd8a32c16e7ed8fce573a8b4b4729171ea2dbd12c/0d" data-source="This transport can be used for both uploading and downloading, and requires you to have a log-in privilege over &lt;code&gt;ssh&lt;/code&gt; to the remote machine. It finds out the set of objects the other side lacks by exchanging the head commits both ends have and transfers (close to) minimum set of objects. It is by far the most efficient way to exchange Git objects between repositories." onmousemove="i18n(this)">&Ecy;&tcy;&ocy;&tcy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &kcy;&acy;&kcy; &dcy;&lcy;&yacy; &vcy;&ycy;&gcy;&rcy;&ucy;&zcy;&kcy;&icy;, &tcy;&acy;&kcy; &icy; &dcy;&lcy;&yacy; &scy;&kcy;&acy;&chcy;&icy;&vcy;&acy;&ncy;&icy;&yacy;, &icy; &ocy;&ncy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy; &ocy;&tcy; &vcy;&acy;&scy; &pcy;&rcy;&icy;&vcy;&icy;&lcy;&iecy;&gcy;&icy;&jcy; &vcy;&khcy;&ocy;&dcy;&acy; &vcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ucy; &chcy;&iecy;&rcy;&iecy;&zcy;  <code>ssh</code>  &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;. &Ocy;&ncy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&yacy;&iecy;&tcy; &ncy;&acy;&bcy;&ocy;&rcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &ncy;&iecy; &khcy;&vcy;&acy;&tcy;&acy;&iecy;&tcy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&iecy;, &pcy;&ucy;&tcy;&iecy;&mcy; &ocy;&bcy;&mcy;&iecy;&ncy;&acy; &gcy;&ocy;&lcy;&ocy;&vcy;&ncy;&ycy;&mcy;&icy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy;&mcy;&icy;, &icy;&mcy;&iecy;&yucy;&shchcy;&icy;&mcy;&icy;&scy;&yacy; &ncy;&acy; &ocy;&bcy;&ocy;&icy;&khcy; &kcy;&ocy;&ncy;&tscy;&acy;&khcy;, &icy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&iecy;&tcy; (&bcy;&lcy;&icy;&zcy;&kcy;&icy;&jcy; &kcy;) &mcy;&icy;&ncy;&icy;&mcy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &ncy;&acy;&bcy;&ocy;&rcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;. &Ncy;&acy; &scy;&iecy;&gcy;&ocy;&dcy;&ncy;&yacy;&shcy;&ncy;&icy;&jcy; &dcy;&iecy;&ncy;&softcy; &ecy;&tcy;&ocy; &scy;&acy;&mcy;&ycy;&jcy; &ecy;&fcy;&fcy;&iecy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&jcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy; &ocy;&bcy;&mcy;&iecy;&ncy;&acy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;&mcy;&icy;  Git  &mcy;&iecy;&zhcy;&dcy;&ucy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;&mcy;&icy;.</span></p> </dd> <dt id="Documentation/gitcore-tutorial.txt-Localdirectory"><span data-i18n="500a0f9db7c97a313c2fac9edf92a93bb2dcf1cfa65a44a005b3618dcda5288d/20" data-source="Local directory" onmousemove="i18n(this)">Local directory</span></dt> <dd> <p><code>/path/to/repo.git/</code></p> <p><span data-i18n="98806ca56535e63d854f142a1c0143df492dbe5151164750595701e5c4fd7597/47" data-source="This transport is the same as SSH transport but uses &lt;code&gt;sh&lt;/code&gt; to run both ends on the local machine instead of running other end on the remote machine via &lt;code&gt;ssh&lt;/code&gt;." onmousemove="i18n(this)">&Ecy;&tcy;&ocy;&tcy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy; &acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&iecy;&ncy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;&ucy; SSH, &ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;  <code>sh</code>  &dcy;&lcy;&yacy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy; &ocy;&bcy;&ocy;&icy;&khcy; &kcy;&ocy;&ncy;&tscy;&ocy;&vcy; &ncy;&acy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &kcy;&ocy;&ncy;&tscy;&acy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; &chcy;&iecy;&rcy;&iecy;&zcy;  <code>ssh</code> .</span></p> </dd> <dt id="Documentation/gitcore-tutorial.txt-GitNative"><span data-i18n="598af302ed8af4f35dd2b7b4abf538a26ca3562136640f5f03fd67170b678d74/f0" data-source="Git Native" onmousemove="i18n(this)">Git Native</span></dt> <dd> <p><code>git://remote.machine/path/to/repo.git/</code></p> <p><span data-i18n="0b05110d3b545e9fb93e71847b4471f2cfc237843c00460a4b18866921e5852d/ea" data-source="This transport was designed for anonymous downloading. Like SSH transport, it finds out the set of objects the downstream side lacks and transfers (close to) minimum set of objects." onmousemove="i18n(this)">&Ecy;&tcy;&ocy;&tcy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy; &bcy;&ycy;&lcy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&acy;&ncy; &dcy;&lcy;&yacy; &acy;&ncy;&ocy;&ncy;&icy;&mcy;&ncy;&ocy;&gcy;&ocy; &scy;&kcy;&acy;&chcy;&icy;&vcy;&acy;&ncy;&icy;&yacy;. &Kcy;&acy;&kcy; &icy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy; SSH, &ocy;&ncy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&yacy;&iecy;&tcy; &ncy;&acy;&bcy;&ocy;&rcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &ncy;&iecy; &khcy;&vcy;&acy;&tcy;&acy;&iecy;&tcy; &ncy;&icy;&scy;&khcy;&ocy;&dcy;&yacy;&shchcy;&iecy;&jcy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&iecy;, &icy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&iecy;&tcy; (&bcy;&lcy;&icy;&zcy;&kcy;&icy;&jcy;) &mcy;&icy;&ncy;&icy;&mcy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &ncy;&acy;&bcy;&ocy;&rcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy;.</span></p> </dd> <dt id="Documentation/gitcore-tutorial.txt-HTTPS"><span data-i18n="ed95b294a92763e986353f4ffd9b1fffee8c1b0ade771f1bd2536aaf65b009bf/6c" data-source="HTTP(S)" onmousemove="i18n(this)">HTTP(S)</span></dt> <dd> <p><code>http://remote.machine/path/to/repo.git/</code></p> <p><span data-i18n="57a9a554eb8da099e0c14d72511eb3fe394a22c44fceae7833dadfa77b631374/b7" data-source="Downloader from http and https URL first obtains the topmost commit object name from the remote site by looking at the specified refname under &lt;code&gt;repo.git/refs/&lt;/code&gt; directory, and then tries to obtain the commit object by downloading from &lt;code&gt;repo.git/objects/xx/xxx...&lt;/code&gt; using the object name of that commit object. Then it reads the commit object to find out its parent commits and the associate tree object; it repeats this process until it gets all the necessary objects. Because of this behavior, they are sometimes also called &lt;code&gt;commit walkers&lt;/code&gt;." onmousemove="i18n(this)">&Zcy;&acy;&gcy;&rcy;&ucy;&zcy;&chcy;&icy;&kcy; &pcy;&ocy; URL-&acy;&dcy;&rcy;&iecy;&scy;&acy;&mcy; http &icy; https &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&iecy;&tcy; &icy;&mcy;&yacy; &scy;&acy;&mcy;&ocy;&gcy;&ocy; &vcy;&iecy;&rcy;&khcy;&ncy;&iecy;&gcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &scy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &scy;&acy;&jcy;&tcy;&acy;, &pcy;&rcy;&ocy;&scy;&mcy;&acy;&tcy;&rcy;&icy;&vcy;&acy;&yacy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ncy;&ocy;&iecy; &icy;&mcy;&yacy; &scy;&scy;&ycy;&lcy;&kcy;&icy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>repo.git/refs/</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy; &pcy;&ycy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &zcy;&acy;&gcy;&rcy;&ucy;&zhcy;&acy;&yacy; &icy;&zcy;  <code>repo.git/objects/xx/xxx...</code> , &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &ecy;&tcy;&ocy;&gcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;. &Zcy;&acy;&tcy;&iecy;&mcy; &ocy;&ncy; &scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&iecy;&tcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&zcy;&ncy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &rcy;&ocy;&dcy;&icy;&tcy;&iecy;&lcy;&softcy;&scy;&kcy;&icy;&iecy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &icy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&jcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;; &ocy;&ncy; &pcy;&ocy;&vcy;&tcy;&ocy;&rcy;&yacy;&iecy;&tcy; &ecy;&tcy;&ocy;&tcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy; &dcy;&ocy; &tcy;&iecy;&khcy; &pcy;&ocy;&rcy;, &pcy;&ocy;&kcy;&acy; &ncy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy; &vcy;&scy;&iecy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;. &Icy;&zcy;-&zcy;&acy; &tcy;&acy;&kcy;&ocy;&gcy;&ocy; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&yacy; &icy;&khcy; &icy;&ncy;&ocy;&gcy;&dcy;&acy; &iecy;&shchcy;&iecy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy;  <code>commit walkers</code> .</span></p> <p><span data-i18n="807f6f285ee3edbf8fa5c79246db04b3ca2a1d55e8540fc09cc4ec73d64e9c44/b6" data-source="The &lt;code&gt;commit walkers&lt;/code&gt; are sometimes also called &lt;code&gt;dumb transports&lt;/code&gt;, because they do not require any Git aware smart server like Git Native transport does. Any stock HTTP server that does not even support directory index would suffice. But you must prepare your repository with &lt;code&gt;git update-server-info&lt;/code&gt; to help dumb transport downloaders." onmousemove="i18n(this)"><code>commit walkers</code>  &icy;&ncy;&ocy;&gcy;&dcy;&acy; &tcy;&acy;&kcy;&zhcy;&iecy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy;  <code>dumb transports</code> , &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &dcy;&lcy;&yacy; &ncy;&icy;&khcy; &ncy;&iecy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;&scy;&yacy; &kcy;&acy;&kcy;&ocy;&jcy;-&lcy;&icy;&bcy;&ocy; &icy;&ncy;&tcy;&iecy;&lcy;&lcy;&iecy;&kcy;&tcy;&ucy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &scy;&iecy;&rcy;&vcy;&iecy;&rcy; &scy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&kcy;&ocy;&jcy;  Git , &vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy; &ocy;&tcy;  Git  Native Transport. &Pcy;&ocy;&dcy;&ocy;&jcy;&dcy;&iecy;&tcy; &lcy;&yucy;&bcy;&ocy;&jcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&jcy; HTTP-&scy;&iecy;&rcy;&vcy;&iecy;&rcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &dcy;&acy;&zhcy;&iecy; &ncy;&iecy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&vcy;. &Ncy;&ocy; &vcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&icy;&tcy;&softcy; &scy;&vcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git update-server-info</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&mcy;&ocy;&chcy;&softcy; &tcy;&ucy;&pcy;&ycy;&mcy; &zcy;&acy;&gcy;&rcy;&ucy;&zcy;&chcy;&icy;&kcy;&acy;&mcy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;&acy;.</span></p> </dd> </dl> </div> <p><span data-i18n="c9501b01d1a42de9e1caf85ee503b3f68122a2e9b9dca1cd7fd91e81b5cd9ab1/89" data-source="Once you fetch from the remote repository, you &lt;code&gt;merge&lt;/code&gt; that with your current branch." onmousemove="i18n(this)">&Kcy;&acy;&kcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&iecy;  <code>merge</code>  &ecy;&tcy;&ocy; &scy; &vcy;&acy;&shcy;&iecy;&jcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&ocy;&jcy;.</span></p> <p><span data-i18n="e6afe9ca9ab6c29486a58a09a2bb704c77f7c254f884a43a94c37921e68b2538/89" data-source="However &amp;mdash; it&amp;rsquo;s such a common thing to &lt;code&gt;fetch&lt;/code&gt; and then immediately &lt;code&gt;merge&lt;/code&gt;, that it&amp;rsquo;s called &lt;code&gt;git pull&lt;/code&gt;, and you can simply do" onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &mdash; &ecy;&tcy;&ocy; &ncy;&acy;&scy;&tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&iecy; &dcy;&iecy;&lcy;&ocy; &dcy;&lcy;&yacy;  <code>fetch</code>  &icy; &tcy;&ucy;&tcy; &zhcy;&iecy;  <code>merge</code> , &chcy;&tcy;&ocy; &ocy;&ncy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>git pull</code> , &icy; &mcy;&ocy;&zhcy;&ncy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;</span></p> <div> <div> <pre class="hljs language-xml">$ git pull <span class="hljs-tag">&lt;<span class="hljs-name">remote-repository</span>&gt;</span></pre> </div> </div> <p><span data-i18n="0d9ff0ed21cd2275370e85534197e3f7c3ed0e8084bec27e61b5281b3d29aa3e/78" data-source="and optionally give a branch-name for the remote end as a second argument." onmousemove="i18n(this)">&icy;, &pcy;&rcy;&icy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy;&scy;&tcy;&icy;, &ucy;&kcy;&acy;&zhcy;&icy;&tcy;&iecy; &icy;&mcy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy; &dcy;&lcy;&yacy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &kcy;&ocy;&ncy;&tscy;&acy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &vcy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&acy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="0f2a6d1fee2dbc111354b1c09cea1812676167925b257edb3ed081cf2a51d53c/24" data-source="You could do without using any branches at all, by keeping as many local repositories as you would like to have branches, and merging between them with &lt;em&gt;git pull&lt;/em&gt;, just like you merge between branches. The advantage of this approach is that it lets you keep a set of files for each &lt;code&gt;branch&lt;/code&gt; checked out and you may find it easier to switch back and forth if you juggle multiple lines of development simultaneously. Of course, you will pay the price of more disk usage to hold multiple working trees, but disk space is cheap these days." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ocy;&bcy;&ocy;&jcy;&tcy;&icy;&scy;&softcy; &vcy;&ocy;&ocy;&bcy;&shchcy;&iecy; &bcy;&iecy;&zcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &kcy;&acy;&kcy;&icy;&khcy;-&lcy;&icy;&bcy;&ocy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy;, &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&vcy; &scy;&tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;, &scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy;, &icy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &mcy;&iecy;&zhcy;&dcy;&ucy; &ncy;&icy;&mcy;&icy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  git  pull, &tcy;&ocy;&chcy;&ncy;&ocy; &tcy;&acy;&kcy; &zhcy;&iecy;, &kcy;&acy;&kcy; &vcy;&ycy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&iecy;&tcy;&iecy; &mcy;&iecy;&zhcy;&dcy;&ucy; &scy;&ocy;&bcy;&ocy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;. &Pcy;&rcy;&iecy;&icy;&mcy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &pcy;&ocy;&dcy;&khcy;&ocy;&dcy;&acy; &zcy;&acy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &tcy;&ocy;&mcy;, &chcy;&tcy;&ocy; &ocy;&ncy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &vcy;&acy;&mcy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&tcy;&softcy; &ncy;&acy;&bcy;&ocy;&rcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy;  <code>branch</code> , &icy; &vcy;&acy;&mcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &pcy;&rcy;&ocy;&shchcy;&iecy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&acy;&tcy;&softcy;&scy;&yacy; &tcy;&ucy;&dcy;&acy; &icy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy; &mcy;&acy;&ncy;&icy;&pcy;&ucy;&lcy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&mcy;&icy; &lcy;&icy;&ncy;&icy;&yacy;&mcy;&icy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&kcy;&icy;. &Kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;, &vcy;&acy;&mcy; &pcy;&rcy;&icy;&dcy;&iecy;&tcy;&scy;&yacy; &zcy;&acy;&pcy;&lcy;&acy;&tcy;&icy;&tcy;&softcy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &zcy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; &dcy;&icy;&scy;&kcy;&ocy;&vcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&rcy;&acy;&ncy;&scy;&tcy;&vcy;&acy; &dcy;&lcy;&yacy; &khcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&yacy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy;, &ncy;&ocy; &vcy; &ncy;&acy;&shcy;&icy; &dcy;&ncy;&icy; &dcy;&icy;&scy;&kcy;&ocy;&vcy;&ocy;&iecy; &pcy;&rcy;&ocy;&scy;&tcy;&rcy;&acy;&ncy;&scy;&tcy;&vcy;&ocy; &scy;&tcy;&ocy;&icy;&tcy; &dcy;&iecy;&shcy;&iecy;&vcy;&ocy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="07b9e2411d719adf64ad9bb39f589f637fc0ba1239c087b598a374bbce0b3ec3/be" data-source="It is likely that you will be pulling from the same remote repository from time to time. As a short hand, you can store the remote repository URL in the local repository&amp;rsquo;s config file like this:" onmousemove="i18n(this)">&Vcy;&pcy;&ocy;&lcy;&ncy;&iecy; &vcy;&iecy;&rcy;&ocy;&yacy;&tcy;&ncy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &bcy;&ucy;&dcy;&iecy;&tcy;&iecy; &vcy;&rcy;&iecy;&mcy;&yacy; &ocy;&tcy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&tcy;&softcy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &icy; &tcy;&ocy;&gcy;&ocy; &zhcy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;. &Vcy;&kcy;&rcy;&acy;&tcy;&tscy;&iecy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; URL-&acy;&dcy;&rcy;&iecy;&scy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &vcy; &fcy;&acy;&jcy;&lcy;&iecy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <div> <pre class="hljs language-ruby" data-highlighted="yes"><span class="hljs-variable">$ </span>git config remote.linus.url <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/git.kernel.org/pub</span><span class="hljs-regexp">/scm/git</span><span class="hljs-regexp">/git.git/</span></pre> </div> </div> <p><span data-i18n="cad56df3019d799084cbf095c85ef31141ec7e6fe037f7becc504e7393d88c01/e5" data-source="and use the &amp;quot;linus&amp;quot; keyword with &lt;code&gt;git pull&lt;/code&gt; instead of the full URL." onmousemove="i18n(this)">&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &kcy;&lcy;&yucy;&chcy;&iecy;&vcy;&ocy;&iecy; &scy;&lcy;&ocy;&vcy;&ocy;  &quot;linus&quot;  &scy;  <code>git pull</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &pcy;&ocy;&lcy;&ncy;&ocy;&gcy;&ocy; URL-&acy;&dcy;&rcy;&iecy;&scy;&acy;.</span></p> <p><span data-i18n="277d6f9a5e6c8fa5daa568117dd727e7d049be4c4057bf590da0a2a5fa7448fe/65" data-source="Examples." onmousemove="i18n(this)">Examples.</span></p> <div> <ol> <li> <p><code>git pull linus</code></p> </li> <li> <p><code>git pull linus tag v0.99.1</code></p> </li> </ol> </div> <p><span data-i18n="b924ee61a2851750b3bf86a826199f01a3c5fff477a3d81f54c7684e30249df7/b4" data-source="the above are equivalent to:" onmousemove="i18n(this)">&vcy;&ycy;&shcy;&iecy;&pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&ncy;&ocy;&iecy; &ecy;&kcy;&vcy;&icy;&vcy;&acy;&lcy;&iecy;&ncy;&tcy;&ncy;&ocy;:</span></p> <div> <ol> <li> <p><code>git pull http://www.kernel.org/pub/scm/git/git.git/ HEAD</code></p> </li> <li> <p><code>git pull http://www.kernel.org/pub/scm/git/git.git/ tag v0.99.1</code></p> </li> </ol> </div> </div> <h2 class="text-body-emphasis"  id="_how_does_the_merge_work"><span data-i18n="2c5c22e2228914dcc824d6cfe82dfbaae8ff84dad92be25ab6c3a3c11f446085/5d" data-source="How does the merge work?" onmousemove="i18n(this)">&Kcy;&acy;&kcy; &pcy;&rcy;&ocy;&icy;&scy;&khcy;&ocy;&dcy;&icy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;?</span></h2> <div> <p><span data-i18n="c53ba701aaa9af3d8ffa5dd28c84c3afa8da1c50ed72471e74d0df862eca2a31/88" data-source="We said this tutorial shows what plumbing does to help you cope with the porcelain that isn&amp;rsquo;t flushing, but we so far did not talk about how the merge really works. If you are following this tutorial the first time, I&amp;rsquo;d suggest to skip to &amp;quot;Publishing your work&amp;quot; section and come back here later." onmousemove="i18n(this)">&Mcy;&ycy; &scy;&kcy;&acy;&zcy;&acy;&lcy;&icy;, &chcy;&tcy;&ocy; &vcy; &ecy;&tcy;&ocy;&mcy; &ucy;&rcy;&ocy;&kcy;&iecy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&ncy;&ocy;, &kcy;&acy;&kcy; &scy;&acy;&ncy;&tcy;&iecy;&khcy;&ncy;&icy;&kcy;&acy; &pcy;&ocy;&mcy;&ocy;&gcy;&acy;&iecy;&tcy; &vcy;&acy;&mcy; &scy;&pcy;&rcy;&acy;&vcy;&icy;&tcy;&softcy;&scy;&yacy; &scy; &ncy;&iecy;&scy;&mcy;&ycy;&vcy;&acy;&iecy;&mcy;&ycy;&mcy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy;&ocy;&mcy;, &ncy;&ocy; &mcy;&ycy; &dcy;&ocy; &scy;&icy;&khcy; &pcy;&ocy;&rcy; &ncy;&iecy; &gcy;&ocy;&vcy;&ocy;&rcy;&icy;&lcy;&icy; &ocy; &tcy;&ocy;&mcy;, &kcy;&acy;&kcy; &ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;. &IEcy;&scy;&lcy;&icy; &vcy;&ycy; &chcy;&icy;&tcy;&acy;&iecy;&tcy;&iecy; &ecy;&tcy;&ocy; &rcy;&ucy;&kcy;&ocy;&vcy;&ocy;&dcy;&scy;&tcy;&vcy;&ocy; &vcy;&pcy;&iecy;&rcy;&vcy;&ycy;&iecy;, &yacy; &bcy;&ycy; &pcy;&ocy;&scy;&ocy;&vcy;&iecy;&tcy;&ocy;&vcy;&acy;&lcy; &pcy;&iecy;&rcy;&iecy;&jcy;&tcy;&icy; &kcy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&ucy;  &quot;Publishing your work&quot;  &icy; &vcy;&iecy;&rcy;&ncy;&ucy;&tcy;&softcy;&scy;&yacy; &scy;&yucy;&dcy;&acy; &pcy;&ocy;&zcy;&zhcy;&iecy;.</span></p> <p><span data-i18n="3b862519a14c321e434fb36476399f347a282d55a41a4e5ff3c13f074194902f/8b" data-source="OK, still with me? To give us an example to look at, let&amp;rsquo;s go back to the earlier repository with &amp;quot;hello&amp;quot; and &amp;quot;example&amp;quot; file, and bring ourselves back to the pre-merge state:" onmousemove="i18n(this)">&KHcy;&ocy;&rcy;&ocy;&shcy;&ocy;, &tcy;&ycy; &iecy;&shchcy;&iecy; &scy;&ocy; &mcy;&ncy;&ocy;&jcy;? &CHcy;&tcy;&ocy;&bcy;&ycy; &dcy;&acy;&tcy;&softcy; &ncy;&acy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &vcy;&iecy;&rcy;&ncy;&iecy;&mcy;&scy;&yacy; &kcy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&mcy;&ucy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yucy; &scy; &fcy;&acy;&jcy;&lcy;&acy;&mcy;&icy;  &quot;hello&quot;  &icy;  &quot;example&quot;  &icy; &vcy;&iecy;&rcy;&ncy;&iecy;&mcy;&scy;&yacy; &vcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &pcy;&iecy;&rcy;&iecy;&dcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;&mcy;:</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">show</span><span class="hljs-operator">-</span>branch <span class="hljs-comment" title="--more=2 master mybranch">--more=2 &mcy;&acy;&scy;&tcy;&iecy;&rcy; &mcy;&ocy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&icy;</span>
<span class="hljs-operator">!</span> [master] <span class="hljs-keyword">Merge</span> work <span class="hljs-keyword">in</span> mybranch
 <span class="hljs-operator">*</span> [mybranch] <span class="hljs-keyword">Merge</span> work <span class="hljs-keyword">in</span> mybranch
<span class="hljs-comment">--</span>
<span class="hljs-comment" title="-- [master] Merge work in mybranch">-- [&mcy;&acy;&scy;&tcy;&iecy;&rcy;] &Ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &vcy; &mcy;&ocy;&iecy;&jcy; &vcy;&iecy;&tcy;&kcy;&iecy;</span>
<span class="hljs-operator">+</span><span class="hljs-operator">*</span> [master<span class="hljs-operator">^</span><span class="hljs-number">2</span>] <span class="hljs-keyword">Some</span> work.
<span class="hljs-operator">+</span><span class="hljs-operator">*</span> [master<span class="hljs-operator">^</span>] <span class="hljs-keyword">Some</span> fun.</pre> </div> </div> <p><span data-i18n="6ac2f57cc6051f6880e83050ea5e924545dc5c5be6f18131f92c706513b85223/04" data-source="Remember, before running &lt;code&gt;git merge&lt;/code&gt;, our &lt;code&gt;master&lt;/code&gt; head was at &amp;quot;Some fun.&amp;quot; commit, while our &lt;code&gt;mybranch&lt;/code&gt; head was at &amp;quot;Some work.&amp;quot; commit." onmousemove="i18n(this)">&Pcy;&ocy;&mcy;&ncy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy; &pcy;&iecy;&rcy;&iecy;&dcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&ocy;&mcy;  <code>git merge</code>  &ncy;&acy;&shcy;&acy; &gcy;&ocy;&lcy;&ocy;&vcy;&kcy;&acy;  <code>master</code>  &ncy;&acy;&khcy;&ocy;&dcy;&icy;&lcy;&acy;&scy;&softcy; &vcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;  &quot;Some fun.&quot; , &acy; &gcy;&ocy;&lcy;&ocy;&vcy;&kcy;&acy;  <code>mybranch</code>  &mdash; &vcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;  &quot;Some work.&quot; .</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git switch -C mybranch master^<span class="hljs-number">2</span>
<span class="hljs-variable">$ </span>git switch master
<span class="hljs-variable">$ </span>git reset --hard master^</pre> </div> </div> <p><span data-i18n="a6e30b75b8bd9b1cc797e3a3aea50a0e56caf42e47d47138c01fb0b6e080f3d3/82" data-source="After rewinding, the commit structure should look like this:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &pcy;&iecy;&rcy;&iecy;&mcy;&ocy;&tcy;&kcy;&icy; &scy;&tcy;&rcy;&ucy;&kcy;&tcy;&ucy;&rcy;&acy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&acy; &dcy;&ocy;&lcy;&zhcy;&ncy;&acy; &vcy;&ycy;&gcy;&lcy;&yacy;&dcy;&iecy;&tcy;&softcy; &tcy;&acy;&kcy;:</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">show</span><span class="hljs-operator">-</span>branch
<span class="hljs-operator">*</span> [master] <span class="hljs-keyword">Some</span> fun.
 <span class="hljs-operator">!</span> [mybranch] <span class="hljs-keyword">Some</span> work.
<span class="hljs-comment">--</span>
<span class="hljs-operator">*</span>  [master] <span class="hljs-keyword">Some</span> fun.
 <span class="hljs-operator">+</span> [mybranch] <span class="hljs-keyword">Some</span> work.
<span class="hljs-operator">*</span><span class="hljs-operator">+</span> [master<span class="hljs-operator">^</span>] <span class="hljs-keyword">Initial</span> <span class="hljs-keyword">commit</span></pre> </div> </div> <p><span data-i18n="435e6b3b416f4f20a4f28340595314a1ead9f46b9d7e2af80534babfb315936a/70" data-source="Now we are ready to experiment with the merge by hand." onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &mcy;&ycy; &gcy;&ocy;&tcy;&ocy;&vcy;&ycy; &pcy;&ocy;&ecy;&kcy;&scy;&pcy;&iecy;&rcy;&icy;&mcy;&iecy;&ncy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &scy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy;&mcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;.</span></p> <p><span data-i18n="f39c096fe2e3486741b1845eed5fae48df9e70ce4e3884c0db058ea0343b80cf/13" data-source="&lt;code&gt;git merge&lt;/code&gt; command, when merging two branches, uses 3-way merge algorithm. First, it finds the common ancestor between them. The command it uses is &lt;code&gt;git merge-base&lt;/code&gt;:" onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git merge</code>  &pcy;&rcy;&icy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&icy; &dcy;&vcy;&ucy;&khcy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &acy;&lcy;&gcy;&ocy;&rcy;&icy;&tcy;&mcy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &ocy;&ncy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &pcy;&rcy;&iecy;&dcy;&kcy;&acy; &mcy;&iecy;&zhcy;&dcy;&ucy; &ncy;&icy;&mcy;&icy;. &Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&acy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &mdash;  <code>git merge-base</code> :</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>mb=<span class="hljs-variable">$(</span>git merge-base <span class="hljs-variable constant_">HEAD</span> mybranch)</pre> </div> </div> <p><span data-i18n="2abe6c77bd3fe120d57daaefa94355aa36ddc55d6d85748dc9727f2c8fb99c5c/49" data-source="The command writes the commit object name of the common ancestor to the standard output, so we captured its output to a variable, because we will be using it in the next step. By the way, the common ancestor commit is the &amp;quot;Initial commit&amp;quot; commit in this case. You can tell it by:" onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&iecy;&tcy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &pcy;&rcy;&iecy;&dcy;&kcy;&acy; &vcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&jcy; &vcy;&ycy;&vcy;&ocy;&dcy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &mcy;&ycy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&icy; &iecy;&gcy;&ocy; &vcy;&ycy;&vcy;&ocy;&dcy; &vcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &mcy;&ycy; &bcy;&ucy;&dcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &ncy;&acy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&mcy; &shcy;&acy;&gcy;&iecy;. &Kcy;&scy;&tcy;&acy;&tcy;&icy;, &vcy; &dcy;&acy;&ncy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ocy;&bcy;&shchcy;&icy;&mcy; &pcy;&rcy;&iecy;&dcy;&kcy;&ocy;&mcy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;  &quot;Initial commit&quot; . &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy; &pcy;&ocy;:</span></p> <div> <div> <pre class="hljs language-perl">$ git name-rev --name-only --tags $mb
<span class="hljs-keyword">my</span>-first-tag</pre> </div> </div> <p><span data-i18n="3e6628773a950d0f32c0e48742252b92ed90f7cbf343f3ed5ba7e8a68b45353d/c0" data-source="After finding out a common ancestor commit, the second step is this:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &vcy;&ycy;&yacy;&scy;&ncy;&iecy;&ncy;&icy;&yacy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &pcy;&rcy;&iecy;&dcy;&kcy;&acy;, &vcy;&tcy;&ocy;&rcy;&ocy;&jcy; &shcy;&acy;&gcy; &zcy;&acy;&kcy;&lcy;&yucy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&mcy;:</span></p> <div> <div> <pre class="hljs language-perl">$ git <span class="hljs-keyword">read</span>-tree -m -u $mb HEAD mybranch</pre> </div> </div> <p><span data-i18n="ceb8369da6462aa6a637ba91c636077cd816c87cf989d242a6b752975b01f98c/7d" data-source="This is the same &lt;code&gt;git read-tree&lt;/code&gt; command we have already seen, but it takes three trees, unlike previous examples. This reads the contents of each tree into different &lt;code&gt;stage&lt;/code&gt; in the index file (the first tree goes to stage 1, the second to stage 2, etc.). After reading three trees into three stages, the paths that are the same in all three stages are &lt;code&gt;collapsed&lt;/code&gt; into stage 0. Also paths that are the same in two of three stages are collapsed into stage 0, taking the SHA-1 from either stage 2 or stage 3, whichever is different from stage 1 (i.e. only one side changed from the common ancestor)." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &tcy;&acy; &zhcy;&iecy; &scy;&acy;&mcy;&acy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;  <code>git read-tree</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ucy;&yucy; &mcy;&ycy; &ucy;&zhcy;&iecy; &vcy;&icy;&dcy;&iecy;&lcy;&icy;, &ncy;&ocy; &ocy;&ncy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &tcy;&rcy;&icy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy; &ocy;&tcy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&icy;&khcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&ocy;&vcy;. &Pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&iecy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &rcy;&acy;&zcy;&ncy;&ycy;&iecy;  <code>stage</code>  &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy; (&pcy;&iecy;&rcy;&vcy;&ocy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &pcy;&iecy;&rcy;&iecy;&khcy;&ocy;&dcy;&icy;&tcy; &ncy;&acy; &ecy;&tcy;&acy;&pcy; 1, &vcy;&tcy;&ocy;&rcy;&ocy;&iecy; &mdash; &ncy;&acy; &ecy;&tcy;&acy;&pcy; 2 &icy; &tcy;. &dcy;.). &Pcy;&ocy;&scy;&lcy;&iecy; &scy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&ncy;&icy;&yacy; &tcy;&rcy;&iecy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy; &ncy;&acy; &tcy;&rcy;&icy; &ecy;&tcy;&acy;&pcy;&acy; &pcy;&ucy;&tcy;&icy;, &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ycy;&iecy; &ncy;&acy; &vcy;&scy;&iecy;&khcy; &tcy;&rcy;&iecy;&khcy; &ecy;&tcy;&acy;&pcy;&acy;&khcy;, &pcy;&iecy;&rcy;&iecy;&khcy;&ocy;&dcy;&yacy;&tcy;  <code>collapsed</code>  &ncy;&acy; &ecy;&tcy;&acy;&pcy; 0. &Kcy;&rcy;&ocy;&mcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &pcy;&ucy;&tcy;&icy;, &ocy;&dcy;&icy;&ncy;&acy;&kcy;&ocy;&vcy;&ycy;&iecy; &ncy;&acy; &dcy;&vcy;&ucy;&khcy; &icy;&zcy; &tcy;&rcy;&iecy;&khcy; &ecy;&tcy;&acy;&pcy;&ocy;&vcy;, &scy;&vcy;&ocy;&rcy;&acy;&chcy;&icy;&vcy;&acy;&yucy;&tcy;&scy;&yacy; &vcy; &ecy;&tcy;&acy;&pcy; 0, &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&yacy; SHA-1 &icy;&zcy; &lcy;&yucy;&bcy;&ocy;&gcy;&ocy; &ecy;&tcy;&acy;&pcy;&acy; 2. &icy;&lcy;&icy; &scy;&tcy;&acy;&dcy;&icy;&yacy; 3, &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy;&acy;&yacy; &icy;&zcy; &ncy;&icy;&khcy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&tcy; &scy;&tcy;&acy;&dcy;&icy;&icy; 1 (&tcy;.&iecy;. &ocy;&tcy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &pcy;&rcy;&iecy;&dcy;&kcy;&acy; &icy;&zcy;&mcy;&iecy;&ncy;&icy;&lcy;&acy;&scy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&ncy;&acy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&acy;).</span></p> <p><span data-i18n="a6948923f5255f8e6f0706aceff7e7c5e6226ca29e637bdde0f3f2c7f101c420/72" data-source="After &lt;code&gt;collapsing&lt;/code&gt; operation, paths that are different in three trees are left in non-zero stages. At this point, you can inspect the index file with this command:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy;  <code>collapsing</code>  &pcy;&ucy;&tcy;&icy;, &rcy;&acy;&zcy;&ncy;&ycy;&iecy; &vcy; &tcy;&rcy;&iocy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&khcy;, &ocy;&scy;&tcy;&acy;&yucy;&tcy;&scy;&yacy; &ncy;&acy; &ncy;&iecy;&ncy;&ucy;&lcy;&iecy;&vcy;&ycy;&khcy; &scy;&tcy;&acy;&dcy;&icy;&yacy;&khcy;. &Ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;&softcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ecy;&tcy;&ocy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;:</span></p> <div> <div> <pre class="hljs language-lua">$ git ls-files <span class="hljs-comment">--stage</span>
<span class="hljs-number">100644</span> <span class="hljs-number">7</span>f8b141b65fdcee47321e399a2598a235a032422 <span class="hljs-number">0</span>        example
<span class="hljs-number">100644</span> <span class="hljs-number">557</span>db03de997c86a4a028e1ebd3a1ceb225be238 <span class="hljs-number">1</span>        hello
<span class="hljs-number">100644</span> ba42a2a96e3027f3333e13ede4ccf4498c3ae942 <span class="hljs-number">2</span>        hello
<span class="hljs-number">100644</span> cc44c73eb783565da5831b4d820c962954019b69 <span class="hljs-number">3</span>        hello</pre> </div> </div> <p><span data-i18n="9ce176ece44fc859f19f9dcfa20919b5abdeb0e28b4be7134abfac71bfe0a0b9/12" data-source="In our example of only two files, we did not have unchanged files so only &lt;code&gt;example&lt;/code&gt; resulted in collapsing. But in real-life large projects, when only a small number of files change in one commit, this &lt;code&gt;collapsing&lt;/code&gt; tends to trivially merge most of the paths fairly quickly, leaving only a handful of real changes in non-zero stages." onmousemove="i18n(this)">&Vcy; &ncy;&acy;&shcy;&iecy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;, &scy;&ocy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&mcy; &vcy;&scy;&iecy;&gcy;&ocy; &icy;&zcy; &dcy;&vcy;&ucy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &ncy;&iecy;&icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&ncy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &ncy;&iecy; &bcy;&ycy;&lcy;&ocy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &scy;&khcy;&lcy;&ocy;&pcy;&ncy;&ucy;&lcy;&scy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy;  <code>example</code> . &Ncy;&ocy; &vcy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&khcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;&khcy;, &kcy;&ocy;&gcy;&dcy;&acy; &zcy;&acy; &ocy;&dcy;&icy;&ncy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &icy;&zcy;&mcy;&iecy;&ncy;&yacy;&iecy;&tcy;&scy;&yacy; &lcy;&icy;&shcy;&softcy; &ncy;&iecy;&bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&iecy; &kcy;&ocy;&lcy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&ocy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &ecy;&tcy;&ocy;&tcy;  <code>collapsing</code>  &icy;&mcy;&iecy;&iecy;&tcy; &tcy;&iecy;&ncy;&dcy;&iecy;&ncy;&tscy;&icy;&yucy; &dcy;&ocy;&vcy;&ocy;&lcy;&softcy;&ncy;&ocy; &bcy;&ycy;&scy;&tcy;&rcy;&ocy; &tcy;&rcy;&icy;&vcy;&icy;&acy;&lcy;&softcy;&ncy;&ocy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&tcy;&softcy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&ocy; &pcy;&ucy;&tcy;&iecy;&jcy;, &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&yacy; &lcy;&icy;&shcy;&softcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ycy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &ncy;&acy; &ncy;&iecy;&ncy;&ucy;&lcy;&iecy;&vcy;&ycy;&khcy; &scy;&tcy;&acy;&dcy;&icy;&yacy;&khcy;.</span></p> <p><span data-i18n="4d5a85f266737e9767e76d4c9f6a732025d69546a73f615179a7122a87c131a2/c3" data-source="To look at only non-zero stages, use &lt;code&gt;--unmerged&lt;/code&gt; flag:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&iecy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ncy;&iecy;&ncy;&ucy;&lcy;&iecy;&vcy;&ycy;&iecy; &ecy;&tcy;&acy;&pcy;&ycy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &fcy;&lcy;&acy;&gcy;  <code>--unmerged</code> :</span></p> <div> <div> <pre class="hljs language-lua">$ git ls-files <span class="hljs-comment">--unmerged</span>
<span class="hljs-number">100644</span> <span class="hljs-number">557</span>db03de997c86a4a028e1ebd3a1ceb225be238 <span class="hljs-number">1</span>        hello
<span class="hljs-number">100644</span> ba42a2a96e3027f3333e13ede4ccf4498c3ae942 <span class="hljs-number">2</span>        hello
<span class="hljs-number">100644</span> cc44c73eb783565da5831b4d820c962954019b69 <span class="hljs-number">3</span>        hello</pre> </div> </div> <p><span data-i18n="eacdeaabd80c0051516616f469fbbdd51a3f6aea5b967774a22f6f2132c54fe0/38" data-source="The next step of merging is to merge these three versions of the file, using 3-way merge. This is done by giving &lt;code&gt;git merge-one-file&lt;/code&gt; command as one of the arguments to &lt;code&gt;git merge-index&lt;/code&gt; command:" onmousemove="i18n(this)">&Scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &shcy;&acy;&gcy;&ocy;&mcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &ecy;&tcy;&icy;&khcy; &tcy;&rcy;&iecy;&khcy; &vcy;&iecy;&rcy;&scy;&icy;&jcy; &fcy;&acy;&jcy;&lcy;&acy; &scy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;&mcy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;. &Ecy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ucy;&tcy;&iecy;&mcy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&icy;&yacy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git merge-one-file</code>  &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &icy;&zcy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git merge-index</code> :</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">merge</span><span class="hljs-operator">-</span>index git<span class="hljs-operator">-</span><span class="hljs-keyword">merge</span><span class="hljs-operator">-</span><span class="hljs-keyword">one</span><span class="hljs-operator">-</span>file hello
Auto<span class="hljs-operator">-</span>merging hello
ERROR: <span class="hljs-keyword">Merge</span> conflict <span class="hljs-keyword">in</span> hello
fatal: <span class="hljs-keyword">merge</span> program failed</pre> </div> </div> <p><span data-i18n="317815e7ff6bc473fa9f92e12fb4040f9351511ec61fd763bcb1b0940e2482b2/b8" data-source="&lt;code&gt;git merge-one-file&lt;/code&gt; script is called with parameters to describe those three versions, and is responsible to leave the merge results in the working tree. It is a fairly straightforward shell script, and eventually calls &lt;code&gt;merge&lt;/code&gt; program from RCS suite to perform a file-level 3-way merge. In this case, &lt;code&gt;merge&lt;/code&gt; detects conflicts, and the merge result with conflict marks is left in the working tree.. This can be seen if you run &lt;code&gt;ls-files
--stage&lt;/code&gt; again at this point:" onmousemove="i18n(this)">&Scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy;  <code>git merge-one-file</code>  &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &scy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&acy;&mcy;&icy; &dcy;&lcy;&yacy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&icy;&yacy; &ecy;&tcy;&icy;&khcy; &tcy;&rcy;&iecy;&khcy; &vcy;&iecy;&rcy;&scy;&icy;&jcy; &icy; &ocy;&tcy;&vcy;&iecy;&chcy;&acy;&iecy;&tcy; &zcy;&acy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&iecy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&ocy;&vcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Ecy;&tcy;&ocy; &dcy;&ocy;&vcy;&ocy;&lcy;&softcy;&ncy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy;&jcy; &scy;&tscy;&iecy;&ncy;&acy;&rcy;&icy;&jcy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &vcy; &kcy;&ocy;&ncy;&iecy;&chcy;&ncy;&ocy;&mcy; &icy;&tcy;&ocy;&gcy;&iecy; &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&ucy;  <code>merge</code>  &icy;&zcy; &pcy;&acy;&kcy;&iecy;&tcy;&acy; RCS &dcy;&lcy;&yacy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &tcy;&rcy;&iecy;&khcy;&scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&gcy;&ocy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &ncy;&acy; &ucy;&rcy;&ocy;&vcy;&ncy;&iecy; &fcy;&acy;&jcy;&lcy;&acy;. &Vcy; &ecy;&tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;  <code>merge</code>  &ocy;&bcy;&ncy;&acy;&rcy;&ucy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ycy;, &acy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &scy; &pcy;&ocy;&mcy;&iecy;&tcy;&kcy;&acy;&mcy;&icy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&acy; &ocy;&scy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Vcy; &ecy;&tcy;&ocy;&mcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&bcy;&iecy;&dcy;&icy;&tcy;&softcy;&scy;&yacy;, &iecy;&scy;&lcy;&icy; &iecy;&shchcy;&iecy; &rcy;&acy;&zcy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>ls-files
--stage</code>  &ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy;:</span></p> <div> <div> <pre class="hljs language-lua">$ git ls-files <span class="hljs-comment">--stage</span>
<span class="hljs-number">100644</span> <span class="hljs-number">7</span>f8b141b65fdcee47321e399a2598a235a032422 <span class="hljs-number">0</span>        example
<span class="hljs-number">100644</span> <span class="hljs-number">557</span>db03de997c86a4a028e1ebd3a1ceb225be238 <span class="hljs-number">1</span>        hello
<span class="hljs-number">100644</span> ba42a2a96e3027f3333e13ede4ccf4498c3ae942 <span class="hljs-number">2</span>        hello
<span class="hljs-number">100644</span> cc44c73eb783565da5831b4d820c962954019b69 <span class="hljs-number">3</span>        hello</pre> </div> </div> <p><span data-i18n="bc025f5c9762164b793c4dd5e523651b20690e0a0a208060047a330250e58941/9b" data-source="This is the state of the index file and the working file after &lt;code&gt;git merge&lt;/code&gt; returns control back to you, leaving the conflicting merge for you to resolve. Notice that the path &lt;code&gt;hello&lt;/code&gt; is still unmerged, and what you see with &lt;code&gt;git diff&lt;/code&gt; at this point is differences since stage 2 (i.e. your version)." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&iecy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy; &icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy; &pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy;  <code>git merge</code>  &vcy;&ocy;&zcy;&vcy;&rcy;&acy;&shchcy;&acy;&iecy;&tcy; &vcy;&acy;&mcy; &ucy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy;, &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&yacy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ucy;&yucy;&shchcy;&iecy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&iecy; &ncy;&acy; &vcy;&acy;&shcy;&iecy; &ucy;&scy;&mcy;&ocy;&tcy;&rcy;&iecy;&ncy;&icy;&iecy;. &Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &pcy;&ucy;&tcy;&softcy;  <code>hello</code>  &vcy;&scy;&iecy; &iecy;&shchcy;&iecy; &ncy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;, &icy; &tcy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &vcy;&icy;&dcy;&icy;&tcy;&iecy; &scy;  <code>git diff</code>  &ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy;, &mdash; &ecy;&tcy;&ocy; &rcy;&acy;&zcy;&lcy;&icy;&chcy;&icy;&yacy; &scy;&ocy; &scy;&tcy;&acy;&dcy;&icy;&icy; 2 (&tcy;. &iecy;. &vcy;&acy;&shcy;&iecy;&jcy; &vcy;&iecy;&rcy;&scy;&icy;&icy;).</span></p> </div> <h2 class="text-body-emphasis"  id="_publishing_your_work"><span data-i18n="6d97ded7e20d3062725b97c96b995e2d315ff945a5b2c204ab05ecdd5fb05db9/09" data-source="Publishing your work" onmousemove="i18n(this)">&Pcy;&ucy;&bcy;&lcy;&icy;&kcy;&acy;&tscy;&icy;&yacy; &vcy;&acy;&shcy;&iecy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy;</span></h2> <div> <p><span data-i18n="e38854545cf06e6800b1bae188321f9298ca4c19109b36b3fc8f7a09221cc378/73" data-source="So, we can use somebody else&amp;rsquo;s work from a remote repository, but how can &lt;strong&gt;you&lt;/strong&gt; prepare a repository to let other people pull from it?" onmousemove="i18n(this)">&Icy;&tcy;&acy;&kcy;, &mcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &chcy;&ucy;&zhcy;&ucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &icy;&zcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &ncy;&ocy; &kcy;&acy;&kcy; &pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&icy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &lcy;&yucy;&dcy;&icy; &mcy;&ocy;&gcy;&lcy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&tcy;&softcy; &icy;&zcy; &ncy;&iecy;&gcy;&ocy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy;?</span></p> <p><span data-i18n="d7cbf260caaf6eb3b38a4d6dbbd97ccf863ed9db68c5249b84e41a2389f36481/a3" data-source="You do your real work in your working tree that has your primary repository hanging under it as its &lt;code&gt;.git&lt;/code&gt; subdirectory. You &lt;strong&gt;could&lt;/strong&gt; make that repository accessible remotely and ask people to pull from it, but in practice that is not the way things are usually done. A recommended way is to have a public repository, make it reachable by other people, and when the changes you made in your primary working tree are in good shape, update the public repository from it. This is often called &lt;code&gt;pushing&lt;/code&gt;." onmousemove="i18n(this)">&Vcy;&ycy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&yacy;&iecy;&tcy;&iecy; &scy;&vcy;&ocy;&yucy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&ucy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &vcy; &scy;&vcy;&ocy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &pcy;&ocy;&dcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  <code>.git</code>  &vcy;&icy;&scy;&icy;&tcy; &vcy;&acy;&shcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;. &Vcy;&ycy; &mcy;&ocy;&gcy;&lcy;&icy; &bcy;&ycy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy; &icy; &pcy;&ocy;&pcy;&rcy;&ocy;&scy;&icy;&tcy;&softcy; &lcy;&yucy;&dcy;&iecy;&jcy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&tcy;&softcy; &icy;&zcy; &ncy;&iecy;&gcy;&ocy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy;, &ncy;&ocy; &ncy;&acy; &pcy;&rcy;&acy;&kcy;&tcy;&icy;&kcy;&iecy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ecy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy;&scy;&yacy; &ncy;&iecy; &tcy;&acy;&kcy;. &Rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&mcy;&ycy;&jcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy; &mdash; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public , &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&mcy; &dcy;&lcy;&yacy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &lcy;&yucy;&dcy;&iecy;&jcy;, &acy; &kcy;&ocy;&gcy;&dcy;&acy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &vcy;&ncy;&iecy;&scy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy;&acy;&mcy;&icy; &vcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;, &bcy;&ucy;&dcy;&ucy;&tcy; &vcy; &khcy;&ocy;&rcy;&ocy;&shcy;&iecy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy;, &ocy;&bcy;&ncy;&ocy;&vcy;&icy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &icy;&zcy; &ncy;&iecy;&gcy;&ocy;. &IEcy;&gcy;&ocy; &chcy;&acy;&scy;&tcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy;  <code>pushing</code> .</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="a76b5139cabf82bbd2f554e508a7706d5caaffbb197ad0687573596b9841ca13/83" data-source="This public repository could further be mirrored, and that is how Git repositories at &lt;code&gt;kernel.org&lt;/code&gt; are managed." onmousemove="i18n(this)">&Ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &mcy;&ocy;&zhcy;&ncy;&ocy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &zcy;&iecy;&rcy;&kcy;&acy;&lcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;, &icy; &icy;&mcy;&iecy;&ncy;&ncy;&ocy; &tcy;&acy;&kcy; &ucy;&pcy;&rcy;&acy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;  Git  &vcy;  <code>kernel.org</code> .</span></td> </tr> </table></div> </div> <p><span data-i18n="3e9aaa7b7ca333d24458ab87b275a321490eef7006ead1a2c1bea85a4b371bd1/ea" data-source="Publishing the changes from your local (private) repository to your remote (public) repository requires a write privilege on the remote machine. You need to have an SSH account there to run a single command, &lt;code&gt;git-receive-pack&lt;/code&gt;." onmousemove="i18n(this)">&Dcy;&lcy;&yacy; &pcy;&ucy;&bcy;&lcy;&icy;&kcy;&acy;&tscy;&icy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; (&chcy;&acy;&scy;&tcy;&ncy;&ocy;&gcy;&ocy;) &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &vcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; (&pcy;&ucy;&bcy;&lcy;&icy;&chcy;&ncy;&ycy;&jcy;) &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &tcy;&rcy;&iecy;&bcy;&ucy;&yucy;&tcy;&scy;&yacy; &pcy;&rcy;&acy;&vcy;&acy; &zcy;&acy;&pcy;&icy;&scy;&icy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;. &Vcy;&acy;&mcy; &pcy;&ocy;&ncy;&acy;&dcy;&ocy;&bcy;&icy;&tcy;&scy;&yacy; &ucy;&chcy;&iecy;&tcy;&ncy;&acy;&yacy; &zcy;&acy;&pcy;&icy;&scy;&softcy; SSH &dcy;&lcy;&yacy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy; &ocy;&dcy;&ncy;&ocy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git-receive-pack</code> .</span></p> <p><span data-i18n="fddaf3887c1a7b66e719287921f6f7025dbf8d7c384d0377401c51a436bc5c37/ee" data-source="First, you need to create an empty repository on the remote machine that will house your public repository. This empty repository will be populated and be kept up to date by pushing into it later. Obviously, this repository creation needs to be done only once." onmousemove="i18n(this)">&Vcy;&ocy;-&pcy;&iecy;&rcy;&vcy;&ycy;&khcy;, &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;, &ncy;&acy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &bcy;&ucy;&dcy;&iecy;&tcy; &rcy;&acy;&zcy;&mcy;&iecy;&shchcy;&iecy;&ncy; &vcy;&acy;&shcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public . &Ecy;&tcy;&ocy;&tcy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &bcy;&ucy;&dcy;&iecy;&tcy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy; &icy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy; &acy;&kcy;&tcy;&ucy;&acy;&lcy;&softcy;&ncy;&ocy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy; &pcy;&ucy;&tcy;&iecy;&mcy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &vcy; &ncy;&iecy;&gcy;&ocy; &dcy;&acy;&ncy;&ncy;&ycy;&khcy; &pcy;&ocy;&zcy;&zhcy;&iecy;. &Ocy;&chcy;&iecy;&vcy;&icy;&dcy;&ncy;&ocy;, &chcy;&tcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&dcy;&icy;&ncy; &rcy;&acy;&zcy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td> <span data-i18n="f8aa2834882724f9b6672ca3a4eb53c329e3cb50d4b848bb022a9dbbee15e8bd/18" data-source="&lt;em&gt;git push&lt;/em&gt; uses a pair of commands, &lt;em&gt;git send-pack&lt;/em&gt; on your local machine, and &lt;em&gt;git-receive-pack&lt;/em&gt; on the remote machine. The communication between the two over the network internally uses an SSH connection." onmousemove="i18n(this)">git  push &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &pcy;&acy;&rcy;&ucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;:  git  send-pack &ncy;&acy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy; &icy;  git  -receive-pack &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;. &Dcy;&lcy;&yacy; &vcy;&ncy;&ucy;&tcy;&rcy;&iecy;&ncy;&ncy;&iecy;&jcy; &scy;&vcy;&yacy;&zcy;&icy; &mcy;&iecy;&zhcy;&dcy;&ucy; &ncy;&icy;&mcy;&icy; &pcy;&ocy; &scy;&iecy;&tcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; SSH.</span></td> </tr> </table></div> </div> <p><span data-i18n="6c0067c7471fa7b886f4a5ed9938646a3ce10c270c64890723de19ee952859a5/34" data-source="Your private repository&amp;rsquo;s Git directory is usually &lt;code&gt;.git&lt;/code&gt;, but your public repository is often named after the project name, i.e. &lt;code&gt;&amp;lt;project&amp;gt;.git&lt;/code&gt;. Let&amp;rsquo;s create such a public repository for project &lt;code&gt;my-git&lt;/code&gt;. After logging into the remote machine, create an empty directory:" onmousemove="i18n(this)">&Kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  private  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>.git</code>  , &ncy;&ocy; &vcy;&acy;&shcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &chcy;&acy;&scy;&tcy;&ocy; &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ocy; &icy;&mcy;&iecy;&ncy;&icy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, &tcy;. &iecy;.  <code>&lt;project&gt;.git</code>  . &Dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &scy;&ocy;&zcy;&dcy;&acy;&dcy;&icy;&mcy; &tcy;&acy;&kcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;  <code>my-git</code> . &Pcy;&ocy;&scy;&lcy;&iecy; &vcy;&khcy;&ocy;&dcy;&acy; &ncy;&acy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy; &scy;&ocy;&zcy;&dcy;&acy;&jcy;&tcy;&iecy; &pcy;&ucy;&scy;&tcy;&ocy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;:</span></p> <div> <div> <pre class="hljs language-perl">$ <span class="hljs-keyword">mkdir</span> <span class="hljs-keyword">my</span>-git.git</pre> </div> </div> <p><span data-i18n="f7e4bfff05db1ad5beeef6a57b3005f130f227d1ff4492f23f0a48d24fee8e63/e4" data-source="Then, make that directory into a Git repository by running &lt;code&gt;git init&lt;/code&gt;, but this time, since its name is not the usual &lt;code&gt;.git&lt;/code&gt;, we do things slightly differently:" onmousemove="i18n(this)">&Zcy;&acy;&tcy;&iecy;&mcy; &pcy;&rcy;&iecy;&vcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &ecy;&tcy;&ocy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  Git , &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git init</code> , &ncy;&ocy; &ncy;&acy; &ecy;&tcy;&ocy;&tcy; &rcy;&acy;&zcy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &iecy;&gcy;&ocy; &icy;&mcy;&yacy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&tcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy;&gcy;&ocy;  <code>.git</code> , &mcy;&ycy; &pcy;&ocy;&scy;&tcy;&ucy;&pcy;&icy;&mcy; &ncy;&iecy;&mcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ocy;-&dcy;&rcy;&ucy;&gcy;&ocy;&mcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-csharp">$ GIT_DIR=my-git.git git <span class="hljs-keyword">init</span></pre> </div> </div> <p><span data-i18n="c3205b0b43392c22bfaeecb39e9dabc8f8584d2e8be9271bcf2c7cee266a18cb/68" data-source="Make sure this directory is available for others you want your changes to be pulled via the transport of your choice. Also you need to make sure that you have the &lt;code&gt;git-receive-pack&lt;/code&gt; program on the &lt;code&gt;$PATH&lt;/code&gt;." onmousemove="i18n(this)">&Ucy;&bcy;&iecy;&dcy;&icy;&tcy;&iecy;&scy;&softcy;, &chcy;&tcy;&ocy; &ecy;&tcy;&ocy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&iecy;&ncy; &dcy;&lcy;&yacy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&iecy;&jcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy;, &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&acy;&shcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &bcy;&ycy;&lcy;&icy; &pcy;&iecy;&rcy;&iecy;&ncy;&iecy;&scy;&iecy;&ncy;&ycy; &chcy;&iecy;&rcy;&iecy;&zcy; &vcy;&ycy;&bcy;&rcy;&acy;&ncy;&ncy;&ycy;&jcy; &vcy;&acy;&mcy;&icy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;. &Tcy;&acy;&kcy;&zhcy;&iecy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &ucy;&bcy;&iecy;&dcy;&icy;&tcy;&softcy;&scy;&yacy;, &chcy;&tcy;&ocy; &ucy; &vcy;&acy;&scy; &ncy;&acy;  <code>$PATH</code>  &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&acy; &ZeroWidthSpace;&ZeroWidthSpace;&pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&acy;  <code>git-receive-pack</code> .</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="e6fcdd7bb10ce9d9f6671eda057ec8435f00138b4433f21e7a4c26b3c493649b/d4" data-source="Many installations of sshd do not invoke your shell as the login shell when you directly run programs; what this means is that if your login shell is &lt;em&gt;bash&lt;/em&gt;, only &lt;code&gt;.bashrc&lt;/code&gt; is read and not &lt;code&gt;.bash_profile&lt;/code&gt;. As a workaround, make sure &lt;code&gt;.bashrc&lt;/code&gt; sets up &lt;code&gt;$PATH&lt;/code&gt; so that you can run &lt;em&gt;git-receive-pack&lt;/em&gt; program." onmousemove="i18n(this)">&Mcy;&ncy;&ocy;&gcy;&icy;&iecy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&kcy;&icy; sshd &ncy;&iecy; &vcy;&ycy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy; &vcy;&acy;&shcy;&ucy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&ucy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy; &vcy;&khcy;&ocy;&dcy;&acy; &vcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ucy; &pcy;&rcy;&icy; &ncy;&iecy;&pcy;&ocy;&scy;&rcy;&iecy;&dcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;&mcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&iecy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;; &ecy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &iecy;&scy;&lcy;&icy; &vcy;&acy;&shcy;&acy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&acy; &vcy;&khcy;&ocy;&dcy;&acy; &mdash; bash, &chcy;&icy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy;  <code>.bashrc</code> , &acy; &ncy;&iecy;  <code>.bash_profile</code> . &Vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &ocy;&bcy;&khcy;&ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ucy;&tcy;&icy; &ucy;&bcy;&iecy;&dcy;&icy;&tcy;&iecy;&scy;&softcy;, &chcy;&tcy;&ocy;  <code>.bashrc</code>  &ncy;&acy;&scy;&tcy;&rcy;&ocy;&icy;&lcy;  <code>$PATH</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &vcy;&ycy; &mcy;&ocy;&gcy;&lcy;&icy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&ucy; git-receive-pack.</span></td> </tr> </table></div> </div> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="4f9d83d9c0b8158f735efe82bafe3539b371402ca30469121c93130fbec9893c/1d" data-source="If you plan to publish this repository to be accessed over http, you should do &lt;code&gt;mv my-git.git/hooks/post-update.sample
my-git.git/hooks/post-update&lt;/code&gt; at this point. This makes sure that every time you push into this repository, &lt;code&gt;git update-server-info&lt;/code&gt; is run." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&lcy;&acy;&ncy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &ocy;&pcy;&ucy;&bcy;&lcy;&icy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &dcy;&lcy;&yacy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy; &chcy;&iecy;&rcy;&iecy;&zcy; http, &ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy; &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &vcy;&ycy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&softcy;  <code>mv my-git.git/hooks/post-update.sample
my-git.git/hooks/post-update</code> . &Ecy;&tcy;&ocy; &gcy;&acy;&rcy;&acy;&ncy;&tcy;&icy;&rcy;&ucy;&iecy;&tcy;, &chcy;&tcy;&ocy; &kcy;&acy;&zhcy;&dcy;&ycy;&jcy; &rcy;&acy;&zcy;, &kcy;&ocy;&gcy;&dcy;&acy; &vcy;&ycy; &vcy;&ncy;&ocy;&scy;&icy;&tcy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &vcy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&iecy;&tcy;&scy;&yacy;  <code>git update-server-info</code> .</span></td> </tr> </table></div> </div> <p><span data-i18n="4925be0b62b9b83c3a978418c1a575615d64f3c2ff6fdfd599f2ab1c964dc860/b3" data-source="Your &amp;quot;public repository&amp;quot; is now ready to accept your changes. Come back to the machine you have your private repository. From there, run this command:" onmousemove="i18n(this)">&Tcy;&iecy;&pcy;&iecy;&rcy;&softcy; &vcy;&acy;&shcy;  &quot;public repository&quot;  &gcy;&ocy;&tcy;&ocy;&vcy; &pcy;&rcy;&icy;&ncy;&yacy;&tcy;&softcy; &vcy;&acy;&shcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;. &Vcy;&iecy;&rcy;&ncy;&icy;&tcy;&iecy;&scy;&softcy; &kcy; &mcy;&acy;&shcy;&icy;&ncy;&iecy;, &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  private . &Ocy;&tcy;&tcy;&ucy;&dcy;&acy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy; &ecy;&tcy;&ucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git push &lt;<span class="hljs-keyword">public</span>-host&gt;<span class="hljs-symbol">:/path/to/my-git</span>.git master</pre> </div> </div> <p><span data-i18n="9107eb8d7994e8e1bdd710bf324916fe11bc1fdc74a57f37a0963918edb76e26/c6" data-source="This synchronizes your public repository to match the named branch head (i.e. &lt;code&gt;master&lt;/code&gt; in this case) and objects reachable from them in your current repository." onmousemove="i18n(this)">&Ecy;&tcy;&ocy; &scy;&icy;&ncy;&khcy;&rcy;&ocy;&ncy;&icy;&zcy;&icy;&rcy;&ucy;&iecy;&tcy; &vcy;&acy;&shcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public , &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&ncy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&lcy; &ncy;&acy;&zcy;&vcy;&acy;&ncy;&ncy;&ocy;&mcy;&ucy; &zcy;&acy;&gcy;&ocy;&lcy;&ocy;&vcy;&kcy;&ucy; &vcy;&iecy;&tcy;&kcy;&icy; (&tcy;.&iecy;. &vcy; &dcy;&acy;&ncy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;  <code>master</code> ) &icy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;&mcy;, &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&mcy; &icy;&zcy; &ncy;&icy;&khcy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> <p><span data-i18n="72d824f7663c9186be3a8ae207d5c0803642931a1ae1bead89b9b2d6470acd42/4a" data-source="As a real example, this is how I update my public Git repository. Kernel.org mirror network takes care of the propagation to other publicly visible machines:" onmousemove="i18n(this)">&Vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &rcy;&iecy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&acy; &yacy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&yucy; &scy;&vcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public   Git . &Zcy;&iecy;&rcy;&kcy;&acy;&lcy;&softcy;&ncy;&acy;&yacy; &scy;&iecy;&tcy;&softcy; Kernel.org &zcy;&acy;&bcy;&ocy;&tcy;&icy;&tcy;&scy;&yacy; &ocy; &rcy;&acy;&scy;&pcy;&rcy;&ocy;&scy;&tcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&icy; &ncy;&acy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &vcy;&icy;&dcy;&icy;&mcy;&ycy;&iecy; &mcy;&acy;&shcy;&icy;&ncy;&ycy;  public :</span></p> <div> <div> <pre class="hljs language-javascript">$ git push master.<span class="hljs-property">kernel</span>.<span class="hljs-property">org</span>:<span class="hljs-regexp">/pub/</span>scm/git/git.<span class="hljs-property">git</span>/</pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_packing_your_repository"><span data-i18n="805627780d3b67f09a22b051981393b04c875f800eeb903eb2524ae9bad616bf/93" data-source="Packing your repository" onmousemove="i18n(this)">&Ucy;&pcy;&acy;&kcy;&ocy;&vcy;&kcy;&acy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;</span></h2> <div> <p><span data-i18n="3a91ef6a0e014422d43e805c25b20ea4fe4debc265ab717ae48e52d88cca31fe/fe" data-source="Earlier, we saw that one file under &lt;code&gt;.git/objects/??/&lt;/code&gt; directory is stored for each Git object you create. This representation is efficient to create atomically and safely, but not so convenient to transport over the network. Since Git objects are immutable once they are created, there is a way to optimize the storage by &amp;quot;packing them together&amp;quot;. The command" onmousemove="i18n(this)">&Rcy;&acy;&ncy;&iecy;&iecy; &mcy;&ycy; &vcy;&icy;&dcy;&iecy;&lcy;&icy;, &chcy;&tcy;&ocy; &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&vcy;&acy;&iecy;&mcy;&ocy;&gcy;&ocy; &vcy;&acy;&mcy;&icy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy;  Git  &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &ocy;&dcy;&icy;&ncy; &fcy;&acy;&jcy;&lcy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>.git/objects/??/</code> . &Tcy;&acy;&kcy;&ocy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &ecy;&fcy;&fcy;&iecy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&vcy;&acy;&tcy;&softcy; &acy;&tcy;&ocy;&mcy;&acy;&rcy;&ncy;&ocy; &icy; &bcy;&iecy;&zcy;&ocy;&pcy;&acy;&scy;&ncy;&ocy;, &ncy;&ocy; &ncy;&iecy; &tcy;&acy;&kcy; &ucy;&dcy;&ocy;&bcy;&ncy;&ocy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &pcy;&ocy; &scy;&iecy;&tcy;&icy;. &Pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;  Git  &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ncy;&iecy;&icy;&zcy;&mcy;&iecy;&ncy;&yacy;&iecy;&mcy;&ycy;&mcy;&icy; &pcy;&ocy;&scy;&lcy;&iecy; &icy;&khcy; &scy;&ocy;&zcy;&dcy;&acy;&ncy;&icy;&yacy;, &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy; &ocy;&pcy;&tcy;&icy;&mcy;&icy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &khcy;&rcy;&acy;&ncy;&icy;&lcy;&icy;&shchcy;&iecy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  &quot;packing them together&quot; . &Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy;</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git repack</pre> </div> </div> <p><span data-i18n="e65d189027aba9dfb913c4b57c99f5ed8e1160e39f127624db2f8f9e0e559700/01" data-source="will do it for you. If you followed the tutorial examples, you would have accumulated about 17 objects in &lt;code&gt;.git/objects/??/&lt;/code&gt; directories by now. &lt;code&gt;git repack&lt;/code&gt; tells you how many objects it packed, and stores the packed file in the &lt;code&gt;.git/objects/pack&lt;/code&gt; directory." onmousemove="i18n(this)">&scy;&dcy;&iecy;&lcy;&acy;&yucy; &ecy;&tcy;&ocy; &zcy;&acy; &tcy;&iecy;&bcy;&yacy;. &IEcy;&scy;&lcy;&icy; &bcy;&ycy; &vcy;&ycy; &scy;&lcy;&iecy;&dcy;&ocy;&vcy;&acy;&lcy;&icy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&acy;&mcy; &rcy;&ucy;&kcy;&ocy;&vcy;&ocy;&dcy;&scy;&tcy;&vcy;&acy;, &kcy; &ncy;&acy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&mcy;&ucy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;&ucy; &ucy; &vcy;&acy;&scy; &ncy;&acy;&kcy;&ocy;&pcy;&icy;&lcy;&ocy;&scy;&softcy; &bcy;&ycy; &ocy;&kcy;&ocy;&lcy;&ocy; 17 &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;&khcy;  <code>.git/objects/??/</code> .  <code>git repack</code>  &scy;&ocy;&ocy;&bcy;&shchcy;&acy;&iecy;&tcy; &vcy;&acy;&mcy;, &scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &ocy;&ncy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&lcy;, &icy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&iecy;&tcy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>.git/objects/pack</code> .</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td><span data-i18n="abc7777e8c86d3a59f952e29888d5c4502a0f8e7d2aa18d5ac1d25d7a85ccf88/5b" data-source="You will see two files, &lt;code&gt;pack-*.pack&lt;/code&gt; and &lt;code&gt;pack-*.idx&lt;/code&gt;, in &lt;code&gt;.git/objects/pack&lt;/code&gt; directory. They are closely related to each other, and if you ever copy them by hand to a different repository for whatever reason, you should make sure you copy them together. The former holds all the data from the objects in the pack, and the latter holds the index for random access." onmousemove="i18n(this)">&Vcy;&ycy; &ucy;&vcy;&icy;&dcy;&icy;&tcy;&iecy; &dcy;&vcy;&acy; &fcy;&acy;&jcy;&lcy;&acy;  <code>pack-*.pack</code>  &icy;  <code>pack-*.idx</code>  &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>.git/objects/pack</code> . &Ocy;&ncy;&icy; &tcy;&iecy;&scy;&ncy;&ocy; &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ycy; &dcy;&rcy;&ucy;&gcy; &scy; &dcy;&rcy;&ucy;&gcy;&ocy;&mcy;, &icy; &iecy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&ocy; &kcy;&acy;&kcy;&ocy;&jcy;-&lcy;&icy;&bcy;&ocy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&iecy; &kcy;&ocy;&gcy;&dcy;&acy;-&lcy;&icy;&bcy;&ocy; &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ucy;&iecy;&tcy;&iecy; &icy;&khcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy; &vcy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &ocy;&bcy;&yacy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &icy;&khcy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy;. &Pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &vcy;&scy;&iecy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &vcy; &pcy;&acy;&kcy;&iecy;&tcy;&iecy;, &acy; &vcy;&tcy;&ocy;&rcy;&ocy;&jcy; &mdash; &icy;&ncy;&dcy;&iecy;&kcy;&scy; &dcy;&lcy;&yacy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="5cfd87a94198f1de900e758ab7dc56aab7325b305372d9c74662888cab1a8997/8d" data-source="If you are paranoid, running &lt;code&gt;git verify-pack&lt;/code&gt; command would detect if you have a corrupt pack, but do not worry too much. Our programs are always perfect ;-)." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&acy;&rcy;&acy;&ncy;&ocy;&icy;&kcy;, &zcy;&acy;&pcy;&ucy;&scy;&kcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git verify-pack</code>  &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;, &iecy;&scy;&tcy;&softcy; &lcy;&icy; &ucy; &vcy;&acy;&scy; &pcy;&ocy;&vcy;&rcy;&iecy;&zhcy;&dcy;&iecy;&ncy;&ncy;&ycy;&jcy; &pcy;&acy;&kcy;&iecy;&tcy;, &ncy;&ocy; &ncy;&iecy; &bcy;&iecy;&scy;&pcy;&ocy;&kcy;&ocy;&jcy;&tcy;&iecy;&scy;&softcy; &scy;&lcy;&icy;&shcy;&kcy;&ocy;&mcy; &scy;&icy;&lcy;&softcy;&ncy;&ocy;. &Ncy;&acy;&shcy;&icy; &pcy;&rcy;&ocy;&gcy;&rcy;&acy;&mcy;&mcy;&ycy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &icy;&dcy;&iecy;&acy;&lcy;&softcy;&ncy;&ycy; ;-).</span></p> <p><span data-i18n="93fa24a834a3b6447738471fdeb34dd987041db64bbd0186dd7c14e73f771345/1f" data-source="Once you have packed objects, you do not need to leave the unpacked objects that are contained in the pack file anymore." onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &tcy;&ocy;&gcy;&ocy; &kcy;&acy;&kcy; &vcy;&ycy; &zcy;&acy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&lcy;&icy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &vcy;&acy;&mcy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy; &ncy;&ucy;&zhcy;&ncy;&ocy; &ocy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&tcy;&softcy; &rcy;&acy;&scy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&iecy;&scy;&yacy; &vcy; &fcy;&acy;&jcy;&lcy;&iecy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&kcy;&icy;.</span></p> <div> <div> <pre class="hljs language-ruby"><span class="hljs-variable">$ </span>git prune-packed</pre> </div> </div> <p><span data-i18n="dae48db67b45048eac28ef261a14d59dc3e25359f2653bc3873a23177e50f5b6/59" data-source="would remove them for you." onmousemove="i18n(this)">&ucy;&dcy;&acy;&lcy;&icy;&lcy; &bcy;&ycy; &icy;&khcy; &dcy;&lcy;&yacy; &vcy;&acy;&scy;.</span></p> <p><span data-i18n="812d94572a19b9152ad09757f082a58a73db0b18e7982d0aa8a6a50e287f3ae9/4d" data-source="You can try running &lt;code&gt;find .git/objects -type f&lt;/code&gt; before and after you run &lt;code&gt;git prune-packed&lt;/code&gt; if you are curious. Also &lt;code&gt;git
count-objects&lt;/code&gt; would tell you how many unpacked objects are in your repository and how much space they are consuming." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&acy;&mcy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ncy;&ocy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&ocy;&pcy;&rcy;&ocy;&bcy;&ocy;&vcy;&acy;&tcy;&softcy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&softcy;  <code>find .git/objects -type f</code>  &dcy;&ocy; &icy; &pcy;&ocy;&scy;&lcy;&iecy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;  <code>git prune-packed</code> . &Tcy;&acy;&kcy;&zhcy;&iecy;  <code>git
count-objects</code>  &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy; &vcy;&acy;&mcy;, &scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&acy;&scy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&khcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &icy; &scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &mcy;&iecy;&scy;&tcy;&acy; &ocy;&ncy;&icy; &zcy;&acy;&ncy;&icy;&mcy;&acy;&yucy;&tcy;.</span></p> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td> <span data-i18n="0d61ecb175133081541cdcc43b84e4d8b81a7a1bd1d62fc3228ef08fc956da26/b0" data-source="&lt;code&gt;git pull&lt;/code&gt; is slightly cumbersome for HTTP transport, as a packed repository may contain relatively few objects in a relatively large pack. If you expect many HTTP pulls from your public repository you might want to repack &amp;amp; prune often, or never." onmousemove="i18n(this)"><code>git pull</code>  &ncy;&iecy;&mcy;&ncy;&ocy;&gcy;&ocy; &gcy;&rcy;&ocy;&mcy;&ocy;&zcy;&dcy;&ocy;&kcy; &dcy;&lcy;&yacy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;&acy; HTTP, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &mcy;&acy;&lcy;&ocy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &vcy; &ocy;&tcy;&ncy;&ocy;&scy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&mcy; &pcy;&acy;&kcy;&iecy;&tcy;&iecy;. &IEcy;&scy;&lcy;&icy; &vcy;&ycy; &ocy;&zhcy;&icy;&dcy;&acy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  public  &bcy;&ucy;&dcy;&iecy;&tcy; &mcy;&ncy;&ocy;&gcy;&ocy; &zcy;&acy;&pcy;&rcy;&ocy;&scy;&ocy;&vcy; HTTP, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &vcy;&acy;&mcy; &zcy;&acy;&khcy;&ocy;&chcy;&iecy;&tcy;&scy;&yacy; &pcy;&iecy;&rcy;&iecy;&ucy;&pcy;&acy;&kcy;&ocy;&vcy;&ycy;&vcy;&acy;&tcy;&softcy; &icy; &scy;&ocy;&kcy;&rcy;&acy;&shchcy;&acy;&tcy;&softcy; &iecy;&gcy;&ocy; &chcy;&acy;&scy;&tcy;&ocy; &icy;&lcy;&icy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy;.</span></td> </tr> </table></div> </div> <p><span data-i18n="61a8c8ceb9c03966c2e77ff5602c17daea6348d364fa28924a9e8a3399f86f74/ce" data-source="If you run &lt;code&gt;git repack&lt;/code&gt; again at this point, it will say &amp;quot;Nothing new to pack.&amp;quot;. Once you continue your development and accumulate the changes, running &lt;code&gt;git repack&lt;/code&gt; again will create a new pack, that contains objects created since you packed your repository the last time. We recommend that you pack your project soon after the initial import (unless you are starting your project from scratch), and then run &lt;code&gt;git repack&lt;/code&gt; every once in a while, depending on how active your project is." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &scy;&ncy;&ocy;&vcy;&acy; &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy;  <code>git repack</code>  &ncy;&acy; &ecy;&tcy;&ocy;&mcy; &ecy;&tcy;&acy;&pcy;&iecy;, &ocy;&ncy; &scy;&kcy;&acy;&zhcy;&iecy;&tcy;  &quot;Nothing new to pack.&quot; . &Kcy;&acy;&kcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&icy;&tcy;&iecy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&kcy;&ucy; &icy; &ncy;&acy;&kcy;&ocy;&pcy;&icy;&tcy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &pcy;&ocy;&vcy;&tcy;&ocy;&rcy;&ncy;&ycy;&jcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;  <code>git repack</code>  &scy;&ocy;&zcy;&dcy;&acy;&scy;&tcy; &ncy;&ocy;&vcy;&ycy;&jcy; &pcy;&acy;&kcy;&iecy;&tcy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&jcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ycy;&iecy; &scy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy;&acy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&iecy;&jcy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&kcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;. &Mcy;&ycy; &rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&mcy; &vcy;&acy;&mcy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &vcy;&scy;&kcy;&ocy;&rcy;&iecy; &pcy;&ocy;&scy;&lcy;&iecy; &pcy;&iecy;&rcy;&vcy;&ocy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &icy;&mcy;&pcy;&ocy;&rcy;&tcy;&acy; (&iecy;&scy;&lcy;&icy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy;&ycy; &ncy;&iecy; &ncy;&acy;&chcy;&icy;&ncy;&acy;&iecy;&tcy;&iecy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &scy; &ncy;&ucy;&lcy;&yacy;), &acy; &zcy;&acy;&tcy;&iecy;&mcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&tcy;&softcy;  <code>git repack</code>  &vcy;&rcy;&iecy;&mcy;&yacy; &ocy;&tcy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy;, &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &ncy;&acy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &acy;&kcy;&tcy;&icy;&vcy;&iecy;&ncy; &vcy;&acy;&shcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;.</span></p> <p><span data-i18n="8d6dca6106cb2aa8c58ed5b073edd631bafbfba5b59fd6d2a3e3d34d79e613a4/a6" data-source="When a repository is synchronized via &lt;code&gt;git push&lt;/code&gt; and &lt;code&gt;git pull&lt;/code&gt; objects packed in the source repository are usually stored unpacked in the destination. While this allows you to use different packing strategies on both ends, it also means you may need to repack both repositories every once in a while." onmousemove="i18n(this)">&Kcy;&ocy;&gcy;&dcy;&acy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &scy;&icy;&ncy;&khcy;&rcy;&ocy;&ncy;&icy;&zcy;&icy;&rcy;&ucy;&iecy;&tcy;&scy;&yacy; &chcy;&iecy;&rcy;&iecy;&zcy;  <code>git push</code>  &icy;  <code>git pull</code> , &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ycy;, &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &vcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;, &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &khcy;&rcy;&acy;&ncy;&yacy;&tcy;&scy;&yacy; &vcy; &rcy;&acy;&scy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ocy;&mcy; &vcy;&icy;&dcy;&iecy; &vcy; &mcy;&iecy;&scy;&tcy;&iecy; &ncy;&acy;&zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy;. &KHcy;&ocy;&tcy;&yacy; &ecy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &vcy;&acy;&mcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &rcy;&acy;&zcy;&ncy;&ycy;&iecy; &scy;&tcy;&rcy;&acy;&tcy;&iecy;&gcy;&icy;&icy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&kcy;&icy; &ncy;&acy; &ocy;&bcy;&ocy;&icy;&khcy; &kcy;&ocy;&ncy;&tscy;&acy;&khcy;, &ecy;&tcy;&ocy; &tcy;&acy;&kcy;&zhcy;&iecy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &pcy;&ocy;&tcy;&rcy;&iecy;&bcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &vcy;&rcy;&iecy;&mcy;&yacy; &ocy;&tcy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy; &pcy;&iecy;&rcy;&iecy;&ucy;&pcy;&acy;&kcy;&ocy;&vcy;&ycy;&vcy;&acy;&tcy;&softcy; &ocy;&bcy;&acy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_working_with_others"><span data-i18n="c18691e2e9256a76c3134f6ad446401e1a62ea309f21799f59df2d47aea5cf1a/aa" data-source="Working with others" onmousemove="i18n(this)">&Rcy;&acy;&bcy;&ocy;&tcy;&acy; &scy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy;</span></h2> <div> <p><span data-i18n="de72802843ee8923a7966afaef4ff36f2a13875ba6959923b01c6eb589499dd7/14" data-source="Although Git is a truly distributed system, it is often convenient to organize your project with an informal hierarchy of developers. Linux kernel development is run this way. There is a nice illustration (page 17, &amp;quot;Merges to Mainline&amp;quot;) in &lt;a href=&quot;https://web.archive.org/web/20120915203609/http://www.xenotime.net/linux/mentor/linux-mentoring-2006.pdf&quot;&gt;Randy Dunlap&amp;rsquo;s presentation&lt;/a&gt;." onmousemove="i18n(this)">&KHcy;&ocy;&tcy;&yacy;  Git  &mdash; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &rcy;&acy;&scy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&acy;&yacy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&acy;, &chcy;&acy;&scy;&tcy;&ocy; &bcy;&ycy;&vcy;&acy;&iecy;&tcy; &ucy;&dcy;&ocy;&bcy;&ncy;&ocy; &ocy;&rcy;&gcy;&acy;&ncy;&icy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ncy;&iecy;&fcy;&ocy;&rcy;&mcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &icy;&iecy;&rcy;&acy;&rcy;&khcy;&icy;&icy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&chcy;&icy;&kcy;&ocy;&vcy;. &Rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&kcy;&acy; &yacy;&dcy;&rcy;&acy; Linux &ocy;&scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;. &IEcy;&scy;&tcy;&softcy; &khcy;&ocy;&rcy;&ocy;&shcy;&acy;&yacy; &icy;&lcy;&lcy;&yucy;&scy;&tcy;&rcy;&acy;&tscy;&icy;&yacy; (&scy;&tcy;&rcy;. 17,  &quot;Merges to Mainline&quot; ) &ucy;  <a href="https://web.archive.org/web/20120915203609/http://www.xenotime.net/linux/mentor/linux-mentoring-2006.pdf">Randy Dunlap&rsquo;s presentation</a> .</span></p> <p><span data-i18n="3959a2a34a250ffc95b42771246ccaab2fc327714780f351ab6b28fee5375cae/2c" data-source="It should be stressed that this hierarchy is purely &lt;strong&gt;informal&lt;/strong&gt;. There is nothing fundamental in Git that enforces the &amp;quot;chain of patch flow&amp;quot; this hierarchy implies. You do not have to pull from only one remote repository." onmousemove="i18n(this)">&Scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &pcy;&ocy;&dcy;&chcy;&iecy;&rcy;&kcy;&ncy;&ucy;&tcy;&softcy;, &chcy;&tcy;&ocy; &ecy;&tcy;&acy; &icy;&iecy;&rcy;&acy;&rcy;&khcy;&icy;&yacy; &ncy;&ocy;&scy;&icy;&tcy; &chcy;&icy;&scy;&tcy;&ocy; &ncy;&iecy;&fcy;&ocy;&rcy;&mcy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy; &khcy;&acy;&rcy;&acy;&kcy;&tcy;&iecy;&rcy;. &Vcy;  Git  &ncy;&iecy;&tcy; &ncy;&icy;&chcy;&iecy;&gcy;&ocy; &fcy;&ucy;&ncy;&dcy;&acy;&mcy;&iecy;&ncy;&tcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy;, &chcy;&tcy;&ocy; &ncy;&acy;&vcy;&yacy;&zcy;&ycy;&vcy;&acy;&lcy;&ocy; &bcy;&ycy;  &quot;chain of patch flow&quot; , &pcy;&ocy;&dcy;&rcy;&acy;&zcy;&ucy;&mcy;&iecy;&vcy;&acy;&iecy;&mcy;&ucy;&yucy; &ecy;&tcy;&ocy;&jcy; &icy;&iecy;&rcy;&acy;&rcy;&khcy;&icy;&iecy;&jcy;. &Vcy;&acy;&mcy; &ncy;&iecy; &ocy;&bcy;&yacy;&zcy;&acy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&tcy;&softcy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&zcy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;.</span></p> <p><span data-i18n="998898ea521c1dfac6de86361c03b6647ad8d815dd68066b71a9e405a8b23edd/6e" data-source="A recommended workflow for a &amp;quot;project lead&amp;quot; goes like this:" onmousemove="i18n(this)">&Rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&mcy;&ycy;&jcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy; &dcy;&lcy;&yacy;  &quot;project lead&quot;  &vcy;&ycy;&gcy;&lcy;&yacy;&dcy;&icy;&tcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <ol> <li> <p><span data-i18n="8486b5f8be9eecfdc94d38f7b8917c9f026f104b26761ca8a63edf6a28dca81c/2b" data-source="Prepare your primary repository on your local machine. Your work is done there." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&softcy;&tcy;&iecy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &ncy;&acy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;. &Vcy;&acy;&shcy;&acy; &rcy;&acy;&bcy;&ocy;&tcy;&acy; &tcy;&acy;&mcy; &zcy;&acy;&kcy;&ocy;&ncy;&chcy;&iecy;&ncy;&acy;.</span></p> </li> <li> <p><span data-i18n="129a64e9979e265ba81af354d584f278148266db69eba08f54ee1830c1b0d168/56" data-source="Prepare a public repository accessible to others." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&softcy;&tcy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public , &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&jcy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;.</span></p> <p><span data-i18n="b6580d3ad45894d933429b494863259fccac588aef3a8f98126504efb8f69ccf/36" data-source="If other people are pulling from your repository over dumb transport protocols (HTTP), you need to keep this repository &lt;code&gt;dumb transport friendly&lt;/code&gt;. After &lt;code&gt;git init&lt;/code&gt;, &lt;code&gt;$GIT_DIR/hooks/post-update.sample&lt;/code&gt; copied from the standard templates would contain a call to &lt;code&gt;git update-server-info&lt;/code&gt; but you need to manually enable the hook with &lt;code&gt;mv post-update.sample post-update&lt;/code&gt;. This makes sure &lt;code&gt;git update-server-info&lt;/code&gt; keeps the necessary files up to date." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &lcy;&yucy;&dcy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&yucy;&tcy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &pcy;&ocy; &tcy;&ucy;&pcy;&ycy;&mcy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;&ncy;&ycy;&mcy; &pcy;&rcy;&ocy;&tcy;&ocy;&kcy;&ocy;&lcy;&acy;&mcy; (HTTP), &vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  <code>dumb transport friendly</code> . &Pcy;&ocy;&scy;&lcy;&iecy;  <code>git init</code> <code>$GIT_DIR/hooks/post-update.sample</code> , &scy;&kcy;&ocy;&pcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&jcy; &icy;&zcy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&khcy; &shcy;&acy;&bcy;&lcy;&ocy;&ncy;&ocy;&vcy;, &bcy;&ucy;&dcy;&iecy;&tcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &vcy;&ycy;&zcy;&ocy;&vcy;  <code>git update-server-info</code> , &ncy;&ocy; &vcy;&acy;&mcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy; &vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &pcy;&iecy;&rcy;&iecy;&khcy;&vcy;&acy;&tcy;&chcy;&icy;&kcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>mv post-update.sample post-update</code> . &Ecy;&tcy;&ocy; &gcy;&acy;&rcy;&acy;&ncy;&tcy;&icy;&rcy;&ucy;&iecy;&tcy;, &chcy;&tcy;&ocy;  <code>git update-server-info</code>  &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&tcy;&softcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &vcy; &acy;&kcy;&tcy;&ucy;&acy;&lcy;&softcy;&ncy;&ocy;&mcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&icy;.</span></p> </li> <li> <p><span data-i18n="e4b8a3ba7d010dca282e244c9eb581d01477fd7e76cbb809fcd19e964785aa0e/b5" data-source="Push into the public repository from your primary repository." onmousemove="i18n(this)">&Zcy;&acy;&gcy;&rcy;&ucy;&zcy;&icy;&tcy;&iecy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;.</span></p> </li> <li> <p><span data-i18n="46251881278fd1d46a42f540950e2b48d9861ddd7a8dda3ffbc7ad561fac6408/b5" data-source="&lt;code&gt;git repack&lt;/code&gt; the public repository. This establishes a big pack that contains the initial set of objects as the baseline, and possibly &lt;code&gt;git prune&lt;/code&gt; if the transport used for pulling from your repository supports packed repositories." onmousemove="i18n(this)"><code>git repack</code>  &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public . &Pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy; &scy;&ocy;&zcy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&jcy; &pcy;&acy;&kcy;&iecy;&tcy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&jcy; &icy;&scy;&khcy;&ocy;&dcy;&ncy;&ycy;&jcy; &ncy;&acy;&bcy;&ocy;&rcy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&ocy;&vcy; &vcy; &kcy;&acy;&chcy;&iecy;&scy;&tcy;&vcy;&iecy; &bcy;&acy;&zcy;&ocy;&vcy;&ocy;&gcy;&ocy; &icy;, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;,  <code>git prune</code> , &iecy;&scy;&lcy;&icy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&jcy; &dcy;&lcy;&yacy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> </li> <li> <p><span data-i18n="f8cd17e7926775326fb9bde8c1fed595af428c1144e588a791ac79c5a8570d98/98" data-source="Keep working in your primary repository. Your changes include modifications of your own, patches you receive via e-mails, and merges resulting from pulling the &amp;quot;public&amp;quot; repositories of your &amp;quot;subsystem maintainers&amp;quot;." onmousemove="i18n(this)">&Pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&jcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &vcy; &scy;&vcy;&ocy;&iecy;&mcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;. &Vcy;&acy;&shcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy;&kcy;&lcy;&yucy;&chcy;&acy;&yucy;&tcy; &vcy; &scy;&iecy;&bcy;&yacy; &vcy;&acy;&shcy;&icy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&iecy; &mcy;&ocy;&dcy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy;, &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&iecy;&tcy;&iecy; &pcy;&ocy; &ecy;&lcy;&iecy;&kcy;&tcy;&rcy;&ocy;&ncy;&ncy;&ocy;&jcy; &pcy;&ocy;&chcy;&tcy;&iecy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;, &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;  &quot;public&quot;  &vcy;&acy;&shcy;&iecy;&gcy;&ocy;  &quot;subsystem maintainers&quot; .</span></p> <p><span data-i18n="1c725470c28c62e112571d7779ef6799cbf8cab1a24c041bc5aff181d5c249c0/d0" data-source="You can repack this private repository whenever you feel like." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&iecy;&rcy;&iecy;&ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  private , &kcy;&ocy;&gcy;&dcy;&acy; &zcy;&acy;&khcy;&ocy;&tcy;&icy;&tcy;&iecy;.</span></p> </li> <li> <p><span data-i18n="d194a1cddf6bea6dddf47baca1394dbf2edd6b0ccb52bd0e3724099b559e4387/60" data-source="Push your changes to the public repository, and announce it to the public." onmousemove="i18n(this)">&Ocy;&tcy;&pcy;&rcy;&acy;&vcy;&softcy;&tcy;&iecy; &scy;&vcy;&ocy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &icy; &scy;&ocy;&ocy;&bcy;&shchcy;&icy;&tcy;&iecy; &ocy;&bcy; &ecy;&tcy;&ocy;&mcy;  public .</span></p> </li> <li> <p><span data-i18n="8f3eb8260fa25349f36b37b3c3f57c6323c3870c4cde9383dbf4449c20e64bbb/0f" data-source="Every once in a while, &lt;code&gt;git repack&lt;/code&gt; the public repository. Go back to step 5. and continue working." onmousemove="i18n(this)">&Vcy;&rcy;&iecy;&mcy;&yacy; &ocy;&tcy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy;  <code>git repack</code>  &mdash; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public . &Vcy;&iecy;&rcy;&ncy;&icy;&tcy;&iecy;&scy;&softcy; &kcy; &shcy;&acy;&gcy;&ucy; 5. &icy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&jcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;.</span></p> </li> </ol> </div> <p><span data-i18n="66d72bf8cc11e7f2beaf8e24300d4c3d4078feb31aac01dcebcc423d4d4771a4/e5" data-source="A recommended work cycle for a &amp;quot;subsystem maintainer&amp;quot; who works on that project and has an own &amp;quot;public repository&amp;quot; goes like this:" onmousemove="i18n(this)">&Rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&mcy;&ycy;&jcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &tscy;&icy;&kcy;&lcy; &dcy;&lcy;&yacy;  &quot;subsystem maintainer&quot; , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy; &ncy;&acy;&dcy; &ecy;&tcy;&icy;&mcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&ocy;&mcy; &icy; &icy;&mcy;&iecy;&iecy;&tcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&jcy;  &quot;public repository&quot; , &vcy;&ycy;&gcy;&lcy;&yacy;&dcy;&icy;&tcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <ol> <li> <p><span data-i18n="e713384b580fa8ac13230a9e85e4c555f297aa135925cd0b017fa5e3ec38f299/82" data-source="Prepare your work repository, by running &lt;code&gt;git clone&lt;/code&gt; on the public repository of the &amp;quot;project lead&amp;quot;. The URL used for the initial cloning is stored in the remote.origin.url configuration variable." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&softcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git clone</code>  &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;  public  &ucy;&scy;&tcy;&rcy;&ocy;&jcy;&scy;&tcy;&vcy;&acy;  &quot;project lead&quot; . URL-&acy;&dcy;&rcy;&iecy;&scy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&jcy; &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&vcy;&ocy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;, &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &vcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy; Remote.origin.url.</span></p> </li> <li> <p><span data-i18n="77905423d7711bf48a0aa78dafcba2e6572a93a3c9eca52b0bf825fdfa23df71/7a" data-source="Prepare a public repository accessible to others, just like the &amp;quot;project lead&amp;quot; person does." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&softcy;&tcy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public , &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&ncy;&ycy;&jcy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;, &kcy;&acy;&kcy; &ecy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&softcy;  &quot;project lead&quot; .</span></p> </li> <li> <p><span data-i18n="e572fe25a9f8cbd1139bf4457d71500b56f012ac15f02817e4e6e9fa4b74c3ed/3d" data-source="Copy over the packed files from &amp;quot;project lead&amp;quot; public repository to your public repository, unless the &amp;quot;project lead&amp;quot; repository lives on the same machine as yours. In the latter case, you can use &lt;code&gt;objects/info/alternates&lt;/code&gt; file to point at the repository you are borrowing from." onmousemove="i18n(this)">&Scy;&kcy;&ocy;&pcy;&icy;&rcy;&ucy;&jcy;&tcy;&iecy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &icy;&zcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  &quot;project lead&quot;   public  &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public , &iecy;&scy;&lcy;&icy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  &quot;project lead&quot;  &ncy;&iecy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &ncy;&acy; &tcy;&ocy;&mcy; &zhcy;&iecy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;, &chcy;&tcy;&ocy; &icy; &vcy;&acy;&shcy;. &Vcy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&iecy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;  <code>objects/info/alternates</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &icy;&zcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &vcy;&ycy; &zcy;&acy;&icy;&mcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;&iecy;.</span></p> </li> <li> <p><span data-i18n="217d7a5299afe0e369d2cd65a653a2c080192762638c4617d6e6eab075594bd6/ef" data-source="Push into the public repository from your primary repository. Run &lt;code&gt;git repack&lt;/code&gt;, and possibly &lt;code&gt;git prune&lt;/code&gt; if the transport used for pulling from your repository supports packed repositories." onmousemove="i18n(this)">&Zcy;&acy;&gcy;&rcy;&ucy;&zcy;&icy;&tcy;&iecy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;. &Zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&tcy;&iecy;  <code>git repack</code>  &icy;, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;,  <code>git prune</code> , &iecy;&scy;&lcy;&icy; &tcy;&rcy;&acy;&ncy;&scy;&pcy;&ocy;&rcy;&tcy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&jcy; &dcy;&lcy;&yacy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> </li> <li> <p><span data-i18n="50efe4bfbe468134e4e892b8d716fb06e4942b09e785f3692707daae25a53a7c/ec" data-source="Keep working in your primary repository. Your changes include modifications of your own, patches you receive via e-mails, and merges resulting from pulling the &amp;quot;public&amp;quot; repositories of your &amp;quot;project lead&amp;quot; and possibly your &amp;quot;sub-subsystem maintainers&amp;quot;." onmousemove="i18n(this)">&Pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&jcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &vcy; &scy;&vcy;&ocy;&iecy;&mcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy;. &Vcy;&acy;&shcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy;&kcy;&lcy;&yucy;&chcy;&acy;&yucy;&tcy; &vcy; &scy;&iecy;&bcy;&yacy; &vcy;&acy;&shcy;&icy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&iecy; &mcy;&ocy;&dcy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy;, &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&acy;&iecy;&tcy;&iecy; &pcy;&ocy; &ecy;&lcy;&iecy;&kcy;&tcy;&rcy;&ocy;&ncy;&ncy;&ocy;&jcy; &pcy;&ocy;&chcy;&tcy;&iecy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy;, &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&ncy;&ycy;&iecy; &vcy; &rcy;&iecy;&zcy;&ucy;&lcy;&softcy;&tcy;&acy;&tcy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;  &quot;public&quot;  &vcy;&acy;&shcy;&iecy;&gcy;&ocy;  &quot;project lead&quot;  &icy;, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &vcy;&acy;&shcy;&iecy;&gcy;&ocy;  &quot;sub-subsystem maintainers&quot; .</span></p> <p><span data-i18n="1c725470c28c62e112571d7779ef6799cbf8cab1a24c041bc5aff181d5c249c0/d0" data-source="You can repack this private repository whenever you feel like." onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&iecy;&rcy;&iecy;&ucy;&pcy;&acy;&kcy;&ocy;&vcy;&acy;&tcy;&softcy; &ecy;&tcy;&ocy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  private , &kcy;&ocy;&gcy;&dcy;&acy; &zcy;&acy;&khcy;&ocy;&tcy;&icy;&tcy;&iecy;.</span></p> </li> <li> <p><span data-i18n="25a7110016c45aa589b28f16fae78c2330edd60bfb71b0ceebcb8c00b64afd29/70" data-source="Push your changes to your public repository, and ask your &amp;quot;project lead&amp;quot; and possibly your &amp;quot;sub-subsystem maintainers&amp;quot; to pull from it." onmousemove="i18n(this)">&Ocy;&tcy;&pcy;&rcy;&acy;&vcy;&softcy;&tcy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &icy; &pcy;&ocy;&pcy;&rcy;&ocy;&scy;&icy;&tcy;&iecy;  &quot;project lead&quot;  &icy;, &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;,  &quot;sub-subsystem maintainers&quot;  &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&softcy; &icy;&zcy; &ncy;&iecy;&gcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;.</span></p> </li> <li> <p><span data-i18n="8f3eb8260fa25349f36b37b3c3f57c6323c3870c4cde9383dbf4449c20e64bbb/0f" data-source="Every once in a while, &lt;code&gt;git repack&lt;/code&gt; the public repository. Go back to step 5. and continue working." onmousemove="i18n(this)">&Vcy;&rcy;&iecy;&mcy;&yacy; &ocy;&tcy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy;  <code>git repack</code>  &mdash; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public . &Vcy;&iecy;&rcy;&ncy;&icy;&tcy;&iecy;&scy;&softcy; &kcy; &shcy;&acy;&gcy;&ucy; 5. &icy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&jcy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy;.</span></p> </li> </ol> </div> <p><span data-i18n="601d4ca318c9dceb8d26fa254fe736f9d12a4237c51fb188aadc9382e130caba/e5" data-source="A recommended work cycle for an &amp;quot;individual developer&amp;quot; who does not have a &amp;quot;public&amp;quot; repository is somewhat different. It goes like this:" onmousemove="i18n(this)">&Rcy;&iecy;&kcy;&ocy;&mcy;&iecy;&ncy;&dcy;&ucy;&iecy;&mcy;&ycy;&jcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &tscy;&icy;&kcy;&lcy; &dcy;&lcy;&yacy;  &quot;individual developer&quot; , &ucy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&gcy;&ocy; &ncy;&iecy;&tcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  &quot;public&quot; , &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &ocy;&tcy;&lcy;&icy;&chcy;&acy;&iecy;&tcy;&scy;&yacy;. &Ecy;&tcy;&ocy; &vcy;&ycy;&gcy;&lcy;&yacy;&dcy;&icy;&tcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;:</span></p> <div> <ol> <li> <p><span data-i18n="6b36a30269f9ef71962d08ee3232413f480826b8a0bf3f4aaba1f5efebed87de/b1" data-source="Prepare your work repository, by &lt;code&gt;git clone&lt;/code&gt; the public repository of the &amp;quot;project lead&amp;quot; (or a &amp;quot;subsystem maintainer&amp;quot;, if you work on a subsystem). The URL used for the initial cloning is stored in the remote.origin.url configuration variable." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&softcy;&tcy;&iecy; &scy;&vcy;&ocy;&jcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;:  <code>git clone</code>  &mdash; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;  public  &dcy;&lcy;&yacy;  &quot;project lead&quot;  (&icy;&lcy;&icy;  &quot;subsystem maintainer&quot; , &iecy;&scy;&lcy;&icy; &vcy;&ycy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;&iecy; &scy; &pcy;&ocy;&dcy;&scy;&icy;&scy;&tcy;&iecy;&mcy;&ocy;&jcy;). URL-&acy;&dcy;&rcy;&iecy;&scy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&mcy;&ycy;&jcy; &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&vcy;&ocy;&ncy;&acy;&chcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy;, &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &vcy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy; Remote.origin.url.</span></p> </li> <li> <p><span data-i18n="f72b56e1a57bfc8b0a616da228eac38483faff1524d456248989e99d6f2cfb60/65" data-source="Do your work in your repository on &lt;code&gt;master&lt;/code&gt; branch." onmousemove="i18n(this)">&Dcy;&iecy;&lcy;&acy;&jcy;&tcy;&iecy; &scy;&vcy;&ocy;&yucy; &rcy;&acy;&bcy;&ocy;&tcy;&ucy; &vcy; &scy;&vcy;&ocy;&iecy;&mcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  <code>master</code> .</span></p> </li> <li> <p><span data-i18n="7e2ac5afa58994c5b456316f2935cb5f8c6ff9c946d3dcfaba77777843ad0a09/37" data-source="Run &lt;code&gt;git fetch origin&lt;/code&gt; from the public repository of your upstream every once in a while. This does only the first half of &lt;code&gt;git pull&lt;/code&gt; but does not merge. The head of the public repository is stored in &lt;code&gt;.git/refs/remotes/origin/master&lt;/code&gt;." onmousemove="i18n(this)">&Vcy;&rcy;&iecy;&mcy;&yacy; &ocy;&tcy; &vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&icy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;&jcy;&tcy;&iecy;  <code>git fetch origin</code>  &icy;&zcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  public  &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &vcy;&ocy;&scy;&khcy;&ocy;&dcy;&yacy;&shchcy;&iecy;&gcy;&ocy; &scy;&iecy;&rcy;&vcy;&iecy;&rcy;&acy;. &Ecy;&tcy;&ocy; &dcy;&iecy;&lcy;&acy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&iecy;&rcy;&vcy;&ucy;&yucy; &pcy;&ocy;&lcy;&ocy;&vcy;&icy;&ncy;&ucy;  <code>git pull</code>  &ncy;&ocy; &ncy;&iecy; &scy;&lcy;&icy;&vcy;&acy;&iecy;&tcy;. &Gcy;&ocy;&lcy;&ocy;&vcy;&acy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  public  &khcy;&rcy;&acy;&ncy;&icy;&tcy;&scy;&yacy; &vcy;  <code>.git/refs/remotes/origin/master</code> .</span></p> </li> <li> <p><span data-i18n="4cbb0eab55b5ccab5e14b914e3a365cceeed6927e8754ce6208daa613c9890bd/96" data-source="Use &lt;code&gt;git cherry origin&lt;/code&gt; to see which ones of your patches were accepted, and/or use &lt;code&gt;git rebase origin&lt;/code&gt; to port your unmerged changes forward to the updated upstream." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git cherry origin</code> , &chcy;&tcy;&ocy;&bcy;&ycy; &ucy;&zcy;&ncy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy;&icy;&iecy; &icy;&zcy; &vcy;&acy;&shcy;&icy;&khcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&jcy; &bcy;&ycy;&lcy;&icy; &pcy;&rcy;&icy;&ncy;&yacy;&tcy;&ycy;, &icy;/&icy;&lcy;&icy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git rebase origin</code>  &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&iecy;&ncy;&ocy;&scy;&acy; &ncy;&iecy;&scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; &vcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &vcy;&ocy;&scy;&khcy;&ocy;&dcy;&yacy;&shchcy;&icy;&jcy; &pcy;&ocy;&tcy;&ocy;&kcy;.</span></p> </li> <li> <p><span data-i18n="c4423c18b75b02a8e7ee8262c05ea4e135734f188187979f18981df2eab92994/80" data-source="Use &lt;code&gt;git format-patch origin&lt;/code&gt; to prepare patches for e-mail submission to your upstream and send it out. Go back to step 2. and continue." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git format-patch origin</code>  &dcy;&lcy;&yacy; &pcy;&ocy;&dcy;&gcy;&ocy;&tcy;&ocy;&vcy;&kcy;&icy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&jcy; &dcy;&lcy;&yacy; &ocy;&tcy;&pcy;&rcy;&acy;&vcy;&kcy;&icy; &pcy;&ocy; &ecy;&lcy;&iecy;&kcy;&tcy;&rcy;&ocy;&ncy;&ncy;&ocy;&jcy; &pcy;&ocy;&chcy;&tcy;&iecy; &vcy; &vcy;&ycy;&shcy;&iecy;&scy;&tcy;&ocy;&yacy;&shchcy;&icy;&jcy; &ocy;&tcy;&dcy;&iecy;&lcy; &icy; &ocy;&tcy;&pcy;&rcy;&acy;&vcy;&kcy;&icy; &icy;&khcy;. &Vcy;&iecy;&rcy;&ncy;&icy;&tcy;&iecy;&scy;&softcy; &kcy; &shcy;&acy;&gcy;&ucy; 2 &icy; &pcy;&rcy;&ocy;&dcy;&ocy;&lcy;&zhcy;&acy;&jcy;&tcy;&iecy;.</span></p> </li> </ol> </div> </div> <h2 class="text-body-emphasis"  id="_working_with_others_shared_repository_style"><span data-i18n="402193e8d80769d792a69565ee2a8154e408d275f9d8f89cefca1e35772acb95/c5" data-source="Working with others, shared repository style" onmousemove="i18n(this)">&Rcy;&acy;&bcy;&ocy;&tcy;&acy; &scy; &dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy;, &scy;&tcy;&icy;&lcy;&softcy; &ocy;&bcy;&shchcy;&iecy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;</span></h2> <div> <p><span data-i18n="d98f6575d3166c5d00994312c08f525f190c932083524de8f538cf94e7d303df/4c" data-source="If you are coming from a CVS background, the style of cooperation suggested in the previous section may be new to you. You do not have to worry. Git supports the &amp;quot;shared public repository&amp;quot; style of cooperation you are probably more familiar with as well." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &ocy;&pcy;&ycy;&tcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &scy; CVS, &scy;&tcy;&icy;&lcy;&softcy; &scy;&ocy;&tcy;&rcy;&ucy;&dcy;&ncy;&icy;&chcy;&iecy;&scy;&tcy;&vcy;&acy;, &pcy;&rcy;&iecy;&dcy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ncy;&ycy;&jcy; &vcy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&iecy;&mcy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;, &mcy;&ocy;&zhcy;&iecy;&tcy; &bcy;&ycy;&tcy;&softcy; &dcy;&lcy;&yacy; &vcy;&acy;&scy; &ncy;&ocy;&vcy;&ycy;&mcy;. &Vcy;&ycy; &ncy;&iecy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &bcy;&iecy;&scy;&pcy;&ocy;&kcy;&ocy;&icy;&tcy;&softcy;&scy;&yacy;.  Git  &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &scy;&tcy;&icy;&lcy;&softcy; &vcy;&zcy;&acy;&icy;&mcy;&ocy;&dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&yacy;  &quot;shared public repository&quot; , &scy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &vcy;&ycy;, &vcy;&iecy;&rcy;&ocy;&yacy;&tcy;&ncy;&ocy;, &tcy;&acy;&kcy;&zhcy;&iecy; &bcy;&ocy;&lcy;&iecy;&iecy; &zcy;&ncy;&acy;&kcy;&ocy;&mcy;&ycy;.</span></p> <p><span data-i18n="c026455690d346dba210292c111f07bc5db568ac63dada45e60cdcd6d9a62524/23" data-source="See &lt;a href=&quot;gitcvs-migration&quot;&gt;gitcvs-migration[7]&lt;/a&gt; for the details." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&scy;&tcy;&icy; &scy;&mcy;. &vcy;  <a href="gitcvs-migration.html">gitcvs-migration[7]</a> .</span></p> </div> <h2 class="text-body-emphasis"  id="_bundling_your_work_together"><span data-i18n="d0ce581e89d71b4eefbc58a214ccfbb839280d058166644dbb4cf608d8d399a8/04" data-source="Bundling your work together" onmousemove="i18n(this)">&Ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&iecy;&ncy;&icy;&iecy; &vcy;&acy;&shcy;&iecy;&jcy; &rcy;&acy;&bcy;&ocy;&tcy;&ycy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy;</span></h2> <div> <p><span data-i18n="26f921112370318ebe9be7ba4cb6867e05920cd1a4bdf4afea921923e563d548/1c" data-source="It is likely that you will be working on more than one thing at a time. It is easy to manage those more-or-less independent tasks using branches with Git." onmousemove="i18n(this)">&Vcy;&pcy;&ocy;&lcy;&ncy;&iecy; &vcy;&iecy;&rcy;&ocy;&yacy;&tcy;&ncy;&ocy;, &chcy;&tcy;&ocy; &vcy;&ycy; &bcy;&ucy;&dcy;&iecy;&tcy;&iecy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&tcy;&softcy; &ncy;&acy;&dcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&mcy;&icy; &dcy;&iecy;&lcy;&acy;&mcy;&icy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;. &Ecy;&tcy;&icy;&mcy;&icy; &bcy;&ocy;&lcy;&iecy;&iecy; &icy;&lcy;&icy; &mcy;&iecy;&ncy;&iecy;&iecy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ycy;&mcy;&icy; &zcy;&acy;&dcy;&acy;&chcy;&acy;&mcy;&icy; &lcy;&iecy;&gcy;&kcy;&ocy; &ucy;&pcy;&rcy;&acy;&vcy;&lcy;&yacy;&tcy;&softcy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy; Git.</span></p> <p><span data-i18n="cab6a003cc23e3da533c78ed880e265565dc45ed47d2e50f617255f1aa40f701/19" data-source="We have already seen how branches work previously, with &amp;quot;fun and work&amp;quot; example using two branches. The idea is the same if there are more than two branches. Let&amp;rsquo;s say you started out from &amp;quot;master&amp;quot; head, and have some new code in the &amp;quot;master&amp;quot; branch, and two independent fixes in the &amp;quot;commit-fix&amp;quot; and &amp;quot;diff-fix&amp;quot; branches:" onmousemove="i18n(this)">&Rcy;&acy;&ncy;&iecy;&iecy; &mcy;&ycy; &ucy;&zhcy;&iecy; &vcy;&icy;&dcy;&iecy;&lcy;&icy;, &kcy;&acy;&kcy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&yucy;&tcy; &vcy;&iecy;&tcy;&kcy;&icy;, &ncy;&acy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;  &quot;fun and work&quot; , &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&shchcy;&iecy;&gcy;&ocy; &dcy;&vcy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy;. &Icy;&dcy;&iecy;&yacy; &tcy;&acy; &zhcy;&iecy;, &iecy;&scy;&lcy;&icy; &vcy;&iecy;&tcy;&vcy;&iecy;&jcy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &dcy;&vcy;&ucy;&khcy;. &Dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;, &vcy;&ycy; &ncy;&acy;&chcy;&acy;&lcy;&icy; &scy; &gcy;&ocy;&lcy;&ocy;&vcy;&ycy;  &quot;master&quot;  &icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&dcy; &vcy; &vcy;&iecy;&tcy;&kcy;&iecy;  &quot;master&quot;  &icy; &dcy;&vcy;&acy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ycy;&khcy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &vcy; &vcy;&iecy;&tcy;&kcy;&acy;&khcy;  &quot;commit-fix&quot;  &icy;  &quot;diff-fix&quot; :</span></p> <div> <div> <pre class="hljs language-yaml"><span class="hljs-string">$</span> <span class="hljs-string">git</span> <span class="hljs-string">show-branch</span>
<span class="hljs-string">!</span> [<span class="hljs-string">commit-fix</span>] <span class="hljs-string">Fix</span> <span class="hljs-string">commit</span> <span class="hljs-string">message</span> <span class="hljs-string">normalization.</span>
 <span class="hljs-string">!</span> [<span class="hljs-string">diff-fix</span>] <span class="hljs-string">Fix</span> <span class="hljs-string">rename</span> <span class="hljs-string">detection.</span>
  <span class="hljs-string">*</span> [<span class="hljs-string">master</span>] <span class="hljs-string">Release</span> <span class="hljs-string">candidate</span> <span class="hljs-comment">#1</span>
<span class="hljs-meta">---</span>
 <span class="hljs-string">+</span>  [<span class="hljs-string">diff-fix</span>] <span class="hljs-string">Fix</span> <span class="hljs-string">rename</span> <span class="hljs-string">detection.</span>
 <span class="hljs-string">+</span>  [<span class="hljs-string">diff-fix~1</span>] <span class="hljs-string">Better</span> <span class="hljs-string">common</span> <span class="hljs-string">substring</span> <span class="hljs-string">algorithm.</span>
<span class="hljs-string">+</span>   [<span class="hljs-string">commit-fix</span>] <span class="hljs-string">Fix</span> <span class="hljs-string">commit</span> <span class="hljs-string">message</span> <span class="hljs-string">normalization.</span>
  <span class="hljs-string">*</span> [<span class="hljs-string">master</span>] <span class="hljs-string">Release</span> <span class="hljs-string">candidate</span> <span class="hljs-comment">#1</span>
<span class="hljs-string">++*</span> [<span class="hljs-string">diff-fix~2</span>] <span class="hljs-string">Pretty-print</span> <span class="hljs-string">messages.</span></pre> </div> </div> <p><span data-i18n="e6235b762b569cb7da04c5627feb2e8b0d9fb922e0894e622513c40577293a29/24" data-source="Both fixes are tested well, and at this point, you want to merge in both of them. You could merge in &lt;code&gt;diff-fix&lt;/code&gt; first and then &lt;code&gt;commit-fix&lt;/code&gt; next, like this:" onmousemove="i18n(this)">&Ocy;&bcy;&acy; &icy;&scy;&pcy;&rcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &khcy;&ocy;&rcy;&ocy;&shcy;&ocy; &pcy;&rcy;&ocy;&tcy;&iecy;&scy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ycy;, &icy; &ncy;&acy; &dcy;&acy;&ncy;&ncy;&ycy;&jcy; &mcy;&ocy;&mcy;&iecy;&ncy;&tcy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &icy;&khcy; &ocy;&bcy;&acy;. &Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy;  <code>diff-fix</code> , &acy; &zcy;&acy;&tcy;&iecy;&mcy;  <code>commit-fix</code> , &vcy;&ocy;&tcy; &tcy;&acy;&kcy;:</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">merge</span> <span class="hljs-operator">-</span>m &quot;Merge fix in diff-fix&quot; diff<span class="hljs-operator">-</span>fix
$ git <span class="hljs-keyword">merge</span> <span class="hljs-operator">-</span>m &quot;Merge fix in commit-fix&quot; <span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix</pre> </div> </div> <p><span data-i18n="e5fff9d00656347e79a5e66b75c947c23dd22db5c9ee71643d90d775e3a9fdca/6c" data-source="Which would result in:" onmousemove="i18n(this)">&CHcy;&tcy;&ocy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&tcy; &kcy;:</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">show</span><span class="hljs-operator">-</span>branch
<span class="hljs-operator">!</span> [<span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix] Fix <span class="hljs-keyword">commit</span> message normalization.
 <span class="hljs-operator">!</span> [diff<span class="hljs-operator">-</span>fix] Fix rename detection.
  <span class="hljs-operator">*</span> [master] <span class="hljs-keyword">Merge</span> fix <span class="hljs-keyword">in</span> <span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix
<span class="hljs-comment">---</span>
  <span class="hljs-operator">-</span> [master] <span class="hljs-keyword">Merge</span> fix <span class="hljs-keyword">in</span> <span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix
<span class="hljs-operator">+</span> <span class="hljs-operator">*</span> [<span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix] Fix <span class="hljs-keyword">commit</span> message normalization.
  <span class="hljs-operator">-</span> [master<span class="hljs-operator">~</span><span class="hljs-number">1</span>] <span class="hljs-keyword">Merge</span> fix <span class="hljs-keyword">in</span> diff<span class="hljs-operator">-</span>fix
 <span class="hljs-operator">+</span><span class="hljs-operator">*</span> [diff<span class="hljs-operator">-</span>fix] Fix rename detection.
 <span class="hljs-operator">+</span><span class="hljs-operator">*</span> [diff<span class="hljs-operator">-</span>fix<span class="hljs-operator">~</span><span class="hljs-number">1</span>] Better common substring algorithm.
  <span class="hljs-operator">*</span> [master<span class="hljs-operator">~</span><span class="hljs-number">2</span>] <span class="hljs-keyword">Release</span> candidate #<span class="hljs-number">1</span>
<span class="hljs-operator">+</span><span class="hljs-operator">+</span><span class="hljs-operator">*</span> [master<span class="hljs-operator">~</span><span class="hljs-number">3</span>] Pretty<span class="hljs-operator">-</span>print messages.</pre> </div> </div> <p><span data-i18n="bbd576e5771eeaae617fa2682af621ce93b165222bf96c6c8e6f8a85a66b26de/02" data-source="However, there is no particular reason to merge in one branch first and the other next, when what you have are a set of truly independent changes (if the order mattered, then they are not independent by definition). You could instead merge those two branches into the current branch at once. First let&amp;rsquo;s undo what we just did and start over. We would want to get the master branch before these two merges by resetting it to &lt;code&gt;master~2&lt;/code&gt;:" onmousemove="i18n(this)">&Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &ncy;&iecy;&tcy; &ocy;&scy;&ocy;&bcy;&ocy;&jcy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&ycy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&tcy;&softcy; &ocy;&dcy;&ncy;&ucy; &vcy;&iecy;&tcy;&kcy;&ucy;, &acy; &zcy;&acy;&tcy;&iecy;&mcy; &dcy;&rcy;&ucy;&gcy;&ucy;&yucy;, &kcy;&ocy;&gcy;&dcy;&acy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &ncy;&acy;&bcy;&ocy;&rcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ycy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy; (&iecy;&scy;&lcy;&icy; &pcy;&ocy;&rcy;&yacy;&dcy;&ocy;&kcy; &icy;&mcy;&iecy;&iecy;&tcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;, &tcy;&ocy; &ocy;&ncy;&icy; &ncy;&iecy; &yacy;&vcy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ycy;&mcy;&icy; &pcy;&ocy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yucy;). &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &ecy;&tcy;&icy; &dcy;&vcy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy; &vcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;. &Scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &dcy;&acy;&vcy;&acy;&jcy;&tcy;&iecy; &ocy;&tcy;&mcy;&iecy;&ncy;&icy;&mcy; &tcy;&ocy;, &chcy;&tcy;&ocy; &mcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;, &icy; &ncy;&acy;&chcy;&ncy;&iecy;&mcy; &zcy;&acy;&ncy;&ocy;&vcy;&ocy;. &Mcy;&ycy; &khcy;&ocy;&tcy;&iecy;&lcy;&icy; &bcy;&ycy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &gcy;&lcy;&acy;&vcy;&ncy;&ucy;&yucy; &vcy;&iecy;&tcy;&kcy;&ucy; &dcy;&ocy; &tcy;&ocy;&gcy;&ocy;, &kcy;&acy;&kcy; &ecy;&tcy;&icy; &dcy;&vcy;&iecy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&tcy;&scy;&yacy;, &scy;&bcy;&rcy;&ocy;&scy;&icy;&vcy; &iecy;&iecy; &ncy;&acy;  <code>master~2</code> :</span></p> <div> <div> <pre class="hljs language-lua">$ git reset <span class="hljs-comment">--hard master~2</span></pre> </div> </div> <p><span data-i18n="3092f8b90dcff4c0c95daaf01211a0b9c1be121d264d8fbbcfa050cf2ad1f73a/b5" data-source="You can make sure &lt;code&gt;git show-branch&lt;/code&gt; matches the state before those two &lt;code&gt;git merge&lt;/code&gt; you just did. Then, instead of running two &lt;code&gt;git merge&lt;/code&gt; commands in a row, you would merge these two branch heads (this is known as &lt;code&gt;making an Octopus&lt;/code&gt;):" onmousemove="i18n(this)">&Vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&bcy;&iecy;&dcy;&icy;&tcy;&softcy;&scy;&yacy;, &chcy;&tcy;&ocy;  <code>git show-branch</code>  &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &scy;&ocy;&scy;&tcy;&ocy;&yacy;&ncy;&icy;&yucy; &pcy;&iecy;&rcy;&iecy;&dcy; &tcy;&iecy;&mcy;&icy; &dcy;&vcy;&ucy;&mcy;&yacy;  <code>git merge</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &chcy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&lcy;&icy;. &Zcy;&acy;&tcy;&iecy;&mcy; &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy; &dcy;&vcy;&ucy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;  <code>git merge</code>  &pcy;&ocy;&dcy;&rcy;&yacy;&dcy; &vcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &ecy;&tcy;&icy; &dcy;&vcy;&iecy; &vcy;&iecy;&tcy;&kcy;&icy; (&ecy;&tcy;&ocy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ocy; &kcy;&acy;&kcy;  <code>making an Octopus</code> ):</span></p> <div> <div> <pre class="hljs language-sql">$ git <span class="hljs-keyword">merge</span> <span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix diff<span class="hljs-operator">-</span>fix
$ git <span class="hljs-keyword">show</span><span class="hljs-operator">-</span>branch
<span class="hljs-operator">!</span> [<span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix] Fix <span class="hljs-keyword">commit</span> message normalization.
 <span class="hljs-operator">!</span> [diff<span class="hljs-operator">-</span>fix] Fix rename detection.
  <span class="hljs-operator">*</span> [master] Octopus <span class="hljs-keyword">merge</span> <span class="hljs-keyword">of</span> branches <span class="hljs-string">&apos;diff-fix&apos;</span> <span class="hljs-keyword">and</span> <span class="hljs-string">&apos;commit-fix&apos;</span>
<span class="hljs-comment">---</span>
  <span class="hljs-operator">-</span> [master] Octopus <span class="hljs-keyword">merge</span> <span class="hljs-keyword">of</span> branches <span class="hljs-string">&apos;diff-fix&apos;</span> <span class="hljs-keyword">and</span> <span class="hljs-string">&apos;commit-fix&apos;</span>
<span class="hljs-operator">+</span> <span class="hljs-operator">*</span> [<span class="hljs-keyword">commit</span><span class="hljs-operator">-</span>fix] Fix <span class="hljs-keyword">commit</span> message normalization.
 <span class="hljs-operator">+</span><span class="hljs-operator">*</span> [diff<span class="hljs-operator">-</span>fix] Fix rename detection.
 <span class="hljs-operator">+</span><span class="hljs-operator">*</span> [diff<span class="hljs-operator">-</span>fix<span class="hljs-operator">~</span><span class="hljs-number">1</span>] Better common substring algorithm.
  <span class="hljs-operator">*</span> [master<span class="hljs-operator">~</span><span class="hljs-number">1</span>] <span class="hljs-keyword">Release</span> candidate #<span class="hljs-number">1</span>
<span class="hljs-operator">+</span><span class="hljs-operator">+</span><span class="hljs-operator">*</span> [master<span class="hljs-operator">~</span><span class="hljs-number">2</span>] Pretty<span class="hljs-operator">-</span>print messages.</pre> </div> </div> <p><span data-i18n="ed41e648947992b606dfb2807da3fbcf7419a9cecd005ad6c769fbc08bb6ec2e/64" data-source="Note that you should not do Octopus just because you can. An octopus is a valid thing to do and often makes it easier to view the commit history if you are merging more than two independent changes at the same time. However, if you have merge conflicts with any of the branches you are merging in and need to hand resolve, that is an indication that the development happened in those branches were not independent after all, and you should merge two at a time, documenting how you resolved the conflicts, and the reason why you preferred changes made in one side over the other. Otherwise it would make the project history harder to follow, not easier." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &ncy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; Octopus &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&ocy;&tcy;&ocy;&mcy;&ucy;, &chcy;&tcy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy;. &Ocy;&scy;&softcy;&mcy;&icy;&ncy;&ocy;&gcy; &mdash; &ecy;&tcy;&ocy; &dcy;&ocy;&pcy;&ucy;&scy;&tcy;&icy;&mcy;&acy;&yacy; &vcy;&iecy;&shchcy;&softcy;, &icy; &ocy;&ncy; &chcy;&acy;&scy;&tcy;&ocy; &ucy;&pcy;&rcy;&ocy;&shchcy;&acy;&iecy;&tcy; &pcy;&rcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;, &iecy;&scy;&lcy;&icy; &vcy;&ycy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&iecy;&tcy;&iecy; &bcy;&ocy;&lcy;&iecy;&iecy; &dcy;&vcy;&ucy;&khcy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ycy;&khcy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&jcy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy;, &iecy;&scy;&lcy;&icy; &ucy; &vcy;&acy;&scy; &iecy;&scy;&tcy;&softcy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ycy; &scy;&lcy;&icy;&yacy;&ncy;&icy;&yacy; &scy; &kcy;&acy;&kcy;&ocy;&jcy;-&lcy;&icy;&bcy;&ocy; &icy;&zcy; &vcy;&iecy;&tcy;&ocy;&kcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&ycy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&yacy;&iecy;&tcy;&iecy;, &icy; &vcy;&acy;&mcy; &ncy;&ucy;&zhcy;&ncy;&ocy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&softcy; &icy;&khcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;, &ecy;&tcy;&ocy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy; &ncy;&acy; &tcy;&ocy;, &chcy;&tcy;&ocy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&ocy;&tcy;&kcy;&acy; &pcy;&rcy;&ocy;&icy;&zcy;&ocy;&shcy;&lcy;&acy; &vcy; &ecy;&tcy;&icy;&khcy; &vcy;&iecy;&tcy;&vcy;&yacy;&khcy;, &vcy; &kcy;&ocy;&ncy;&tscy;&iecy; &kcy;&ocy;&ncy;&tscy;&ocy;&vcy;, &ncy;&iecy; &bcy;&ycy;&lcy;&icy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ycy;&mcy;&icy;, &icy; &vcy;&acy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &ocy;&bcy;&hardcy;&iecy;&dcy;&icy;&ncy;&icy;&tcy;&softcy; &dcy;&vcy;&iecy; &ocy;&dcy;&ncy;&ocy;&vcy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;, &dcy;&ocy;&kcy;&ucy;&mcy;&iecy;&ncy;&tcy;&icy;&rcy;&ucy;&yacy;, &kcy;&acy;&kcy; &vcy;&ycy; &rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&lcy;&icy; &kcy;&ocy;&ncy;&fcy;&lcy;&icy;&kcy;&tcy;&ycy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &pcy;&rcy;&icy;&chcy;&icy;&ncy;&ucy;, &pcy;&ocy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&jcy; &vcy;&ycy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&chcy;&lcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &vcy;&ncy;&iecy;&scy;&iecy;&ncy;&ncy;&ycy;&iecy; &scy; &ocy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ycy;, &acy; &ncy;&iecy; &scy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy;. &Vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &scy;&lcy;&iecy;&dcy;&icy;&tcy;&softcy; &zcy;&acy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&iecy;&jcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &bcy;&ucy;&dcy;&iecy;&tcy; &tcy;&rcy;&ucy;&dcy;&ncy;&iecy;&iecy;, &acy; &ncy;&iecy; &pcy;&rcy;&ocy;&shchcy;&iecy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="53c118a244a3a3c10ba378755c976d087a8ed38aaa75a4b5e72b0a953686fd49/70" data-source="&lt;a href=&quot;gittutorial&quot;&gt;gittutorial[7]&lt;/a&gt;, &lt;a href=&quot;gittutorial-2&quot;&gt;gittutorial-2[7]&lt;/a&gt;, &lt;a href=&quot;gitcvs-migration&quot;&gt;gitcvs-migration[7]&lt;/a&gt;, &lt;a href=&quot;git-help&quot;&gt;git-help[1]&lt;/a&gt;, &lt;a href=&quot;giteveryday&quot;&gt;giteveryday[7]&lt;/a&gt;, &lt;a href=&quot;user-manual&quot;&gt;The Git User&amp;rsquo;s Manual&lt;/a&gt;" onmousemove="i18n(this)"><a href="gittutorial.html">gittutorial[7]</a> ,  <a href="gittutorial-2.html">gittutorial-2[7]</a> ,  <a href="gitcvs-migration.html">gitcvs-migration[7]</a> ,  <a href="git-help.html">git-help[1]</a> ,  <a href="giteveryday.html">giteveryday[7]</a> ,  <a href="user-manual.html">The Git User&rsquo;s Manual</a></span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/gitcore-tutorial">https://git-scm.com/docs/gitcore-tutorial</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                               <ins class="adsbygoogle"
        style="display:block"
        data-ad-format="autorelaxed"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="7867651344"></ins>
   <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
   </script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitcredentials.html">
                            gitcredentials                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitcvs-migration.html">
                            gitcvs migration                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitdiffcore.html">
                            gitdiffcore                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="giteveryday.html">
                            giteveryday                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitfaq.html">
                            gitfaq                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitformat-bundle.html">
                            gitformat bundle                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitformat-chunk.html">
                            gitformat chunk                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="gitcore-tutorial.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>